/* ==========================================================================
   SEMENITWASTED — PORTFOLIO PAGE STYLESHEET
   Locked strictly by SKILL.md and portfolio_page_spec.md
   Monochrome + Bento Grid + Fixed Shadow System + 10px Signature Radius
   ========================================================================== */

/* --- 3. Locked Visual System & Design Tokens (SKILL.md) --- */
:root {
  /* Core Monochrome Palette */
  --color-light: #F0EDF4;
  --color-dark: #211B28;
  --color-shadow: #450D50;

  /* Surfaces & Borders */
  --background: var(--color-light);
  --surface: #FCFAFD;
  --surface-soft: #F5F0F8;
  --border: #E4DCE9;

  /* Text & Hierarchy */
  --text-primary: var(--color-dark);
  --text-secondary: #756A7D;
  --strong: var(--color-dark);
  --disabled: #D5CCD9;

  /* Fixed Shadows (Exact values from SKILL.md Section 3) */
  --shadow-primary: 18px 18px 16px rgb(69 13 80 / 20%);
  --shadow-depth: 4px 4px 4px rgb(69 13 80 / 25%);
  --shadow-hover: 8px 8px 8px rgb(69 13 80 / 22%);
  --shadow-pressed: 2px 2px 2px rgb(69 13 80 / 30%);

  /* Radius (Signature 10px from SKILL.md Section 3) */
  --radius-card: 10px;
  --radius-sm: 8px;
  --radius-pill: 999px;

  /* Typography */
  --font-family: 'Rubik', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Motion & Animation Tokens (references/animation.md) */
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --dur-micro: 150ms;
  --dur-ui: 200ms;
  --dur-reveal: 400ms;
  --lift: -2px;

  /* Emil Kowalski Easing & Spring Tokens (tactile-micro-interactions/SKILL.md) */
  --ease-spring-snappy: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-press: cubic-bezier(0.4, 0, 0.2, 1);

  /* Grid & Spacing (Even-number scale from SKILL.md) */
  --container-max: 1440px;
  --grid-gap: 24px;
}

/* --- Dark Theme Support --- */
[data-theme="dark"] {
  --background: #18121E;
  --surface: #221B2B;
  --surface-soft: #2B2336;
  --border: #3B3248;

  --text-primary: #F7F4FA;
  --text-secondary: #B8AFC0;
  --text-muted: #9B8EA6;
  --strong: #FAF8FC;
  --disabled: #554A62;

  --color-shadow: #D8B5E4;
  --color-accent: #D8B5E4;

  --shadow-primary: 18px 18px 24px rgba(0, 0, 0, 0.46);
  --shadow-depth: 4px 4px 8px rgba(0, 0, 0, 0.36);
  --shadow-hover: 8px 8px 14px rgba(0, 0, 0, 0.40);
  --shadow-pressed: 2px 2px 4px rgba(0, 0, 0, 0.45);
}

[data-theme="dark"] .btn-primary {
  color: var(--color-dark);
}

[data-theme="dark"] .btn-primary:hover {
  color: #FCFAFD;
}

[data-theme="dark"] .brand-logo-img {
  filter: brightness(0) invert(1);
}

[data-theme="dark"] .filter-pill.active {
  color: var(--color-dark);
}

[data-theme="dark"] .footer-platform-card {
  background: var(--surface-soft);
}

[data-theme="dark"] .footer-platform-card:hover {
  background: var(--surface);
}

[data-theme="dark"] .footer-platform-icon--monochrome {
  filter: brightness(0) invert(1);
}

/* --- Reset & Global Baseline --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-family);
  background-color: var(--background);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* --- Page Layout Container --- */
.portfolio-page-wrapper {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px 80px 24px;
  position: relative;
}

/* --- 10. NAVBAR --- */
.portfolio-navbar {
  position: sticky;
  top: 16px;
  z-index: 100;
  width: 100%;
  max-width: 1342px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  margin: 16px auto 40px;
  background: var(--surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-primary);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

[data-theme="dark"] .portfolio-navbar {
  background: var(--surface);
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
}

.brand-logo-img {
  height: 48px;
  width: auto;
  display: block;
  transition: transform 0.25s ease;
}

.brand-link:hover .brand-logo-img {
  transform: scale(1.04);
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-link-item {
  display: inline-flex;
  align-items: center;
  padding: 6px 2px;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--text-primary);
  position: relative;
  transition: color 0.25s ease;
}

.nav-link-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: width 0.25s ease;
}

.nav-link-item:hover::after,
.nav-link-item.active::after {
  width: 100%;
}

.theme-toggle-btn {
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-primary);
  transition: background-color 0.2s ease, transform 0.2s ease;
  margin-left: -16px;
}

.theme-toggle-btn:hover {
  background: var(--surface-soft);
  transform: scale(1.04);
}

.mobile-nav-controls {
  display: none;
  align-items: center;
  gap: 4px;
}

.mobile-theme-btn {
  margin-left: 0;
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 4px;
}

.mobile-menu-toggle span {
  width: 24px;
  height: 2px;
  background-color: var(--text-primary);
  border-radius: 2px;
  transition: 0.3s ease;
}

/* Mobile Drawer */
.mobile-nav-drawer {
  display: none;
  position: fixed;
  top: 112px;
  left: 24px;
  right: 24px;
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: 24px;
  box-shadow: var(--shadow-primary);
  z-index: 100;
  flex-direction: column;
  gap: 16px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.mobile-nav-drawer.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.mobile-nav-drawer a {
  text-decoration: none;
  color: var(--text-primary);
  padding: 8px 12px;
  font-size: 1.15rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: background-color 0.2s ease;
}

.mobile-nav-drawer a:hover,
.mobile-nav-drawer a.active {
  background: var(--surface-soft);
}

/* --- 11. HERO SECTION --- */
.portfolio-hero {
  margin-bottom: 64px;
  padding: 32px 0 16px 0;
}

.hero-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 48px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-primary);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 20px;
  box-shadow: var(--shadow-depth);
}

.hero-eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--strong);
}

.hero-title {
  font-size: clamp(2.4rem, 4.4vw, 4rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--strong);
  margin-bottom: 20px;
}

.hero-desc {
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 560px;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background-color: var(--strong);
  color: #FCFAFD;
  font-weight: 600;
  font-size: 1rem;
  padding: 14px 28px;
  border-radius: var(--radius-card);
  text-decoration: none;
  border: 1px solid var(--strong);
  cursor: pointer;
  box-shadow: var(--shadow-depth);
  transition: transform var(--dur-ui) var(--ease-out),
              box-shadow var(--dur-ui) var(--ease-out),
              background-color var(--dur-ui) var(--ease-out),
              border-color var(--dur-ui) var(--ease-out);
}

.btn-primary:hover {
  background-color: #382D42;
  border-color: #382D42;
  transform: translateY(var(--lift));
  box-shadow: var(--shadow-primary);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: var(--surface);
  color: var(--text-primary);
  font-weight: 500;
  font-size: 1rem;
  padding: 14px 26px;
  border-radius: var(--radius-card);
  text-decoration: none;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-depth);
  transition: transform var(--dur-ui) var(--ease-out),
              box-shadow var(--dur-ui) var(--ease-out),
              background-color var(--dur-ui) var(--ease-out),
              border-color var(--dur-ui) var(--ease-out);
}

.btn-secondary:hover {
  background-color: var(--surface-soft);
  border-color: var(--strong);
  transform: translateY(var(--lift));
  box-shadow: var(--shadow-primary);
}

.btn-primary:active,
.btn-secondary:active {
  transform: translateY(1px) scale(0.985);
  box-shadow: 0 2px 4px rgba(69, 13, 80, 0.16),
              inset 0 1px 2px rgba(33, 27, 40, 0.12);
  transition-duration: 0.06s;
}

/* Abstract Tactile Visual (Hero Right) - Restrained Monochrome */
.hero-visual-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 32px;
  box-shadow: var(--shadow-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 360px;
  overflow: hidden;
}

.abstract-neumorphic-art {
  width: 100%;
  max-width: 360px;
  height: auto;
  display: block;
}

.hero-visual-card--portrait {
  background: #FCFAFD;
  padding: 0;
  min-height: 0;
  width: 100%;
  max-width: 400px;
  aspect-ratio: 1 / 1;
  justify-self: end;
}

.hero-portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* --- 12. CATEGORY FILTER --- */
.category-filter-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 20px;
  flex-wrap: wrap;
}

.filter-pills-group {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 40px 48px;
  margin: -4px -40px -40px;
  scrollbar-width: none;
}

.filter-pills-group::-webkit-scrollbar {
  display: none;
}

.filter-pill {
  appearance: none;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-family: var(--font-family);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  white-space: nowrap;
  box-shadow: var(--shadow-depth);
  transition: all 0.2s ease;
}

.filter-pill:hover {
  color: var(--text-primary);
  transform: translateY(-2px);
  background-color: var(--surface-soft);
}

.filter-pill:active {
  transform: translateY(1px) scale(0.985);
  box-shadow: 0 2px 4px rgba(69, 13, 80, 0.16),
              inset 0 1px 2px rgba(33, 27, 40, 0.12);
  transition-duration: 0.06s;
}

.filter-pill.active {
  background: var(--strong);
  color: #FCFAFD;
  border-color: var(--strong);
  font-weight: 600;
  box-shadow: var(--shadow-primary);
}

.filter-sort-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.sort-badge {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  color: var(--text-primary);
}

/* --- 13. BENTO PORTFOLIO GRID (12-Column Asymmetric) --- */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--grid-gap);
  margin-bottom: 64px;
}

/* Column spans according to Section 13 */
.col-span-3 { grid-column: span 3; }
.col-span-4 { grid-column: span 4; }
.col-span-6 { grid-column: span 6; }
.col-span-8 { grid-column: span 8; }
.col-span-12 { grid-column: span 12; }

/* --- 16. CARD DESIGN (10px Signature Radius from SKILL.md) --- */
.bento-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 24px;
  box-shadow: var(--shadow-primary);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  min-height: 380px;
}

/* 17. Hover behavior: translateY(-2px to -4px) per SKILL.md */
.bento-card:hover {
  transform: translateY(-3px);
  border-color: rgba(69, 13, 80, 0.25);
}

.bento-card:active {
  transform: translateY(1px) scale(0.985);
  box-shadow: 0 2px 4px rgba(69, 13, 80, 0.16),
              inset 0 1px 2px rgba(33, 27, 40, 0.12);
  transition-duration: 0.06s;
}

/* Card Header */
.card-top-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.card-category-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-primary);
  background: var(--surface-soft);
  border: 1px solid var(--border);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-cta-icon {
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.bento-card:hover .card-cta-icon {
  background: var(--strong);
  color: var(--surface);
  border-color: var(--strong);
  transform: translateX(3px);
}

[data-theme="dark"] .bento-card:hover .card-cta-icon {
  background: var(--strong);
  color: #211B28;
  border-color: var(--strong);
}

/* Card Visual Container (Web Design Mockup Frame) */
.card-preview-frame {
  flex: 1;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  min-height: 190px;
}

/* Browser Mockup Top Bar */
.browser-top-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.65);
  border-bottom: 1px solid var(--border);
}

[data-theme="dark"] .browser-top-bar {
  background: rgba(0, 0, 0, 0.25);
}

.browser-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--disabled);
}

.browser-dot.dot-red { background: #FF5F56; opacity: 0.8; }
.browser-dot.dot-yellow { background: #FFBD2E; opacity: 0.8; }
.browser-dot.dot-green { background: #27C93F; opacity: 0.8; }

.browser-address {
  margin-left: 8px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-family: monospace;
  background: var(--surface);
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.preview-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  position: relative;
  overflow: hidden;
}

/* Portfolio preview primitives: presentation belongs in CSS, not generated inline styles. */
.featured-preview-copy { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.5; }
.featured-preview-tags, .preview-swatch-row, .preview-switch-row, .preview-audio-bars, .preview-web-actions { display: flex; align-items: center; }
.featured-preview-tags { gap: 8px; }
.card-tag--light { background: var(--surface-soft); color: var(--text-secondary); border: 1px solid var(--border); }
.preview-content--swatches { flex-direction: column; gap: 10px; }
.preview-swatch-row { justify-content: center; gap: 8px; width: 100%; }
.preview-swatch { width: 36px; height: 36px; border-radius: var(--radius-card); }
.preview-swatch--dark { background: var(--color-dark); box-shadow: 0 4px 8px rgb(33 27 40 / 30%); }
.preview-swatch--shadow { background: var(--color-shadow); box-shadow: 0 4px 8px rgb(69 13 80 / 25%); }
.preview-swatch--border { background: var(--border); border: 1px solid var(--disabled); }
.preview-swatch--light { background: var(--color-light); border: 1px solid var(--disabled); }
.preview-caption, .preview-control-label { color: var(--text-secondary); font-size: 0.75rem; font-weight: 500; }
.preview-caption { text-align: center; }
.preview-controls { display: flex; flex-direction: column; align-items: center; gap: 12px; width: 100%; max-width: 280px; }
.preview-switch-row { gap: 12px; }
.preview-control-label { font-weight: 600; }
.preview-switch { display: flex; justify-content: flex-end; width: 48px; height: 26px; padding: 3px; border-radius: var(--radius-pill); background: var(--strong); }
.preview-switch-thumb { width: 20px; height: 20px; border-radius: 50%; background: var(--surface); box-shadow: 0 2px 4px rgb(0 0 0 / 25%); }
.preview-progress { width: 100%; height: 8px; overflow: hidden; border-radius: var(--radius-pill); background: var(--border); }
.preview-progress-value { width: 68%; height: 100%; background: var(--strong); }
.preview-audio-bars { gap: 4px; height: 50px; }
.preview-audio-bars span { width: 4px; border-radius: 2px; background: var(--strong); }
.preview-audio-bars span:nth-child(1) { height: 18px; }.preview-audio-bars span:nth-child(2) { height: 34px; }.preview-audio-bars span:nth-child(3) { height: 46px; background: var(--text-secondary); }.preview-audio-bars span:nth-child(4) { height: 28px; }.preview-audio-bars span:nth-child(5) { height: 40px; background: var(--text-secondary); }.preview-audio-bars span:nth-child(6) { height: 22px; }.preview-audio-bars span:nth-child(7) { height: 12px; }
.preview-web-layout { display: flex; flex-direction: column; gap: 8px; width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.preview-web-title, .preview-web-line, .preview-web-actions div { border-radius: 4px; background: var(--border); }
.preview-web-title { width: 40%; height: 8px; background: var(--strong); opacity: 0.75; }.preview-web-line { height: 6px; }.preview-web-line--long { width: 85%; }.preview-web-line--medium { width: 65%; }.preview-web-actions { gap: 6px; margin-top: 4px; }.preview-web-actions div { width: 24px; height: 14px; background: var(--surface-soft); }

.preview-artwork-img {
  max-width: 100%;
  max-height: 160px;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.bento-card:hover .preview-artwork-img {
  transform: scale(1.04);
}

/* Icon Grid Preview */
.preview-icon-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 100%;
  max-width: 220px;
}

.mini-icon-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-depth);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.mini-icon-box:hover {
  transform: translateY(-2px);
  border-color: var(--strong);
}

.mini-icon-box svg, .mini-icon-box img {
  width: 24px;
  height: 24px;
}

/* AI Icon Grid Preview */
.preview-content--ai-icons {
  padding: 18px;
}

.preview-ai-icon-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 100%;
  max-width: 240px;
}

.mini-ai-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-depth);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.mini-ai-box:hover {
  transform: translateY(-2px);
  border-color: var(--strong);
}

.mini-ai-box img {
  width: 28px;
  height: 28px;
  display: block;
}

[data-theme="dark"] .mini-ai-box img {
  filter: invert(0.9) brightness(1.2);
}

/* Card Content Details */
.card-content-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.card-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--strong);
}

.card-description {
  font-size: 0.925rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.card-case-link {
  align-self: flex-start;
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 600;
  margin-top: 16px;
  text-decoration: none;
  text-underline-offset: 0.2em;
}

.card-case-link:hover {
  text-decoration: underline;
}

.card-preview-frame--roche-case-study,
.card-preview-frame--selenia-experiment-preview {
  flex: 0 0 240px;
  height: 240px;
  max-height: 240px;
}

.card-preview-frame--roche-case-study .preview-content,
.card-preview-frame--selenia-experiment-preview .preview-content {
  flex: 1 1 auto;
  height: calc(100% - 34px);
  min-height: 0;
  padding: 0;
  overflow: hidden;
  position: relative;
}

.roche-preview-image,
.selenia-preview-image {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.bento-card:hover .roche-preview-image,
.bento-card:hover .selenia-preview-image {
  transform: scale(1.035);
}

.preview-content--selenia {
  background-color: #D2D2D2;
}

[data-theme="dark"] .preview-content--selenia {
  background-color: #211B28;
}

.card-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.card-tag {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--surface-soft);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
}

/* --- 15. FEATURED CARD (Unified with White Neumorphic Bento System) --- */
.bento-card.card-featured {
  background: var(--surface);
  color: var(--text-primary);
  border-color: var(--border);
  box-shadow: var(--shadow-primary);
}

.card-featured .card-category-label {
  background: var(--surface-soft);
  border-color: var(--border);
  color: var(--text-primary);
}

.card-featured .card-cta-icon {
  background: var(--surface-soft);
  color: var(--text-primary);
  border-color: var(--border);
}

.card-featured:hover .card-cta-icon {
  background: var(--strong);
  color: var(--surface);
  border-color: var(--strong);
}

[data-theme="dark"] .card-featured:hover .card-cta-icon {
  background: var(--strong);
  color: #211B28;
  border-color: var(--strong);
}

.card-featured .card-title {
  color: var(--strong);
  font-size: 1.65rem;
}

.card-featured .card-description {
  color: var(--text-secondary);
  max-width: 580px;
}

.card-featured .card-preview-frame {
  background: var(--surface-soft);
  border-color: var(--border);
}

.card-featured .browser-top-bar {
  background: rgba(255, 255, 255, 0.65);
  border-color: var(--border);
}

[data-theme="dark"] .card-featured .browser-top-bar {
  background: rgba(0, 0, 0, 0.25);
}

.card-featured .browser-address {
  background: var(--surface);
  color: var(--text-secondary);
  border-color: var(--border);
}

.card-featured .card-tag {
  background: var(--surface-soft);
  border-color: var(--border);
  color: var(--text-secondary);
}

/* Featured visual composition */
.featured-preview-layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 24px;
}

.featured-art-side {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.featured-art-side img {
  max-height: 190px;
  width: auto;
  filter: drop-shadow(0 10px 20px rgba(69, 13, 80, 0.15));
  transition: transform 0.3s ease;
}

.card-featured:hover .featured-art-side img {
  transform: scale(1.05);
}

.featured-details-side {
  flex: 1.2;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.featured-stat-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* --- 18. EMPTY STATE SECTION --- */
.empty-state-section {
  margin-bottom: 64px;
}

.empty-state-card {
  background: var(--surface-soft);
  border: 1px dashed var(--border);
  border-radius: var(--radius-card);
  padding: 48px 32px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: border-color 0.25s ease;
}

.empty-state-card:hover {
  border-color: var(--strong);
}

.empty-state-icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--strong);
  box-shadow: var(--shadow-depth);
  margin-bottom: 16px;
}

.empty-state-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--strong);
  margin-bottom: 8px;
}

.empty-state-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 480px;
}

/* --- 19. DESIGN STATEMENT (Monochrome Refined) --- */
.design-statement-section {
  margin-bottom: 64px;
}

.design-statement-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 48px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-primary);
}

.statement-quote-mark {
  font-family: Georgia, serif;
  font-size: 4.5rem;
  line-height: 1;
  color: var(--text-secondary);
  opacity: 0.35;
  margin-bottom: -16px;
}

.statement-quote-text {
  font-size: clamp(1.4rem, 2.2vw, 2rem);
  font-weight: 600;
  line-height: 1.35;
  color: var(--strong);
  max-width: 800px;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.statement-author {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: lowercase;
}

/* --- 20. CTA SECTION --- */
.cta-section {
  margin-bottom: 80px;
}

.cta-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 64px 48px;
  box-shadow: var(--shadow-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  position: relative;
  overflow: hidden;
}

.cta-copy {
  max-width: 600px;
}

.cta-title {
  font-size: clamp(2rem, 3.2vw, 2.8rem);
  font-weight: 700;
  color: var(--strong);
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

.cta-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.cta-actions {
  flex-shrink: 0;
}

/* --- 21. FOOTER --- */
.portfolio-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-brand {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--strong);
}

.footer-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.footer-platforms {
  display: grid;
  grid-template-columns: repeat(5, minmax(64px, 82px));
  gap: 12px;
}

.footer-platform-card {
  height: 72px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-depth);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.footer-platform-card:hover {
  transform: translateY(-3px);
  border-color: var(--strong);
  box-shadow: var(--shadow-primary);
}

.footer-platform-icon {
  max-width: 100%;
  max-height: 36px;
  object-fit: contain;
}

/* --- ABOUT PAGE --- */
.about-support-grid,
.capability-grid,
.skills-grid {
  display: grid;
  gap: 24px;
}

.about-hero {
  margin-bottom: 80px;
}

.about-hero-layout {
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  align-items: center;
}

.about-hero .hero-desc {
  margin-bottom: 12px;
}

.about-card,
.contact-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-primary);
}

.section-label {
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.section-heading h2,
.about-card h2,
.contact-card h2 {
  color: var(--strong);
  line-height: 1.1;
}

.about-hero-role {
  color: var(--text-secondary);
  font-size: 1.1rem;
  font-weight: 500;
}

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

.section-heading {
  margin-bottom: 24px;
}

.section-heading h2 {
  font-size: clamp(2rem, 3vw, 3rem);
  margin-top: 8px;
}

.capability-grid,
.skills-grid {
  grid-template-columns: repeat(3, 1fr);
}

.about-card {
  padding: 28px;
}

.about-card h3 {
  color: var(--strong);
  font-size: 1.2rem;
  line-height: 1.3;
  margin-bottom: 12px;
}

.about-card p,
.experience-item p,
.contact-card > div > p {
  color: var(--text-secondary);
}

.experience-timeline {
  list-style: none;
  display: grid;
  gap: 16px;
}

.experience-item {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 24px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-depth);
}

.experience-period {
  color: var(--strong) !important;
  font-weight: 700;
}

.experience-item h3 {
  color: var(--strong);
  font-size: 1.15rem;
  line-height: 1.35;
  margin-bottom: 4px;
}

.experience-organization {
  margin-bottom: 12px;
  font-weight: 600;
}

.about-inline-link {
  color: var(--strong);
  font-weight: 500;
  text-decoration: none;
  text-underline-offset: 0.2em;
  transition: color var(--dur-ui) var(--ease-out);
}

.about-inline-link:hover {
  text-decoration: underline;
}

.about-support-grid {
  grid-template-columns: 1.4fr 0.6fr;
  margin-bottom: 80px;
}

.implementation-card,
.education-card {
  min-height: 240px;
}

.about-card .section-label {
  margin-bottom: 16px;
}

.about-card h2 {
  font-size: 1.7rem;
  margin-bottom: 16px;
}

.about-bullet-list {
  margin-top: 14px;
  padding-left: 18px;
  display: grid;
  gap: 8px;
  color: var(--text-secondary);
}

.about-card-note {
  margin-top: 8px;
  font-size: 0.875rem;
}

.project-highlight-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.project-highlight-card .section-label,
.project-highlight-card h3 {
  margin-bottom: 0;
}

.certifications-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.certification-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.certification-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.certification-card .section-label {
  margin-bottom: 0;
}

.certification-id {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--surface-soft);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.certification-credential-meta {
  font-size: 0.825rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.certification-card h3 {
  margin-bottom: 0;
}

.certification-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: auto;
  padding-top: 8px;
}

.certification-link {
  color: var(--strong);
  font-size: 0.925rem;
  font-weight: 600;
  text-decoration: none;
  text-underline-offset: 0.2em;
  transition: color var(--dur-ui) var(--ease-out), transform var(--dur-ui) var(--ease-out);
}

.certification-link:hover {
  text-decoration: underline;
  transform: translateX(2px);
}

.certification-link--secondary {
  color: var(--text-secondary);
  font-weight: 500;
}

.certification-link--secondary:hover {
  color: var(--strong);
}

.contact-card {
  margin-bottom: 32px;
  padding: 40px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
}

.contact-card h2 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  margin: 8px 0;
}

.contact-actions,
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.contact-actions {
  justify-content: flex-end;
}

.contact-links {
  grid-column: 1 / -1;
}

.contact-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--color-shadow);
  outline-offset: 4px;
}

[data-theme="dark"] a:focus-visible,
[data-theme="dark"] button:focus-visible {
  outline-color: var(--color-light);
}

/* --- 22. RESPONSIVE DESIGN --- */

/* Tablet: 768px – 1199px (8 columns) */
@media (max-width: 1199px) {
  .hero-layout {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .hero-visual-card--portrait {
    justify-self: center;
    max-width: 360px;
  }

  .bento-grid {
    grid-template-columns: repeat(8, 1fr);
  }

  .col-span-8 { grid-column: span 8; }
  .col-span-6 { grid-column: span 4; }
  .col-span-4 { grid-column: span 4; }
  .col-span-3 { grid-column: span 4; }

  .featured-preview-layout {
    flex-direction: column;
    align-items: flex-start;
  }

  .capability-grid,
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-support-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 1100px) {
  .category-filter-section {
    align-items: stretch;
    flex-direction: column;
    gap: 16px;
  }

  .filter-pills-group {
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 8px;
    padding: 4px 0 12px 0;
    margin: 0;
    overflow: visible;
  }

  .filter-pill.active {
    box-shadow: var(--shadow-hover, 8px 8px 8px rgb(69 13 80 / 22%));
  }

  .filter-sort-indicator {
    justify-content: space-between;
  }
}

/* Mobile: < 768px (4 columns / stacked) */
@media (max-width: 767px) {
  .portfolio-page-wrapper {
    padding: 0 16px 60px 16px;
  }

  .portfolio-navbar {
    top: 12px;
    height: 70px;
    padding: 0 24px;
    margin-bottom: 28px;
  }

  .navbar-nav {
    display: none;
  }

  .mobile-nav-controls {
    display: flex;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .mobile-nav-drawer {
    display: flex;
  }

  .hero-title {
    font-size: 2.2rem;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .btn-primary, .btn-secondary {
    width: 100%;
  }

  .bento-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .col-span-3,
  .col-span-4,
  .col-span-6,
  .col-span-8,
  .col-span-12 {
    grid-column: span 1;
  }

  .bento-card {
    min-height: auto;
    padding: 20px;
  }

  .card-top-meta {
    gap: 8px;
    margin-bottom: 14px;
  }

  .card-category-label {
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    padding: 3px 10px;
  }

  .card-cta-icon {
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    font-size: 0.85rem;
    flex-shrink: 0;
  }

  .card-preview-frame--roche-case-study,
  .card-preview-frame--selenia-experiment-preview {
    flex: 0 0 190px;
    height: 190px;
    max-height: 190px;
  }

  .cta-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 36px 24px;
    gap: 24px;
  }

  .cta-actions {
    width: 100%;
  }

  .cta-actions .btn-primary {
    width: 100%;
  }

  .portfolio-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .footer-platforms {
    width: 100%;
    grid-template-columns: repeat(5, 1fr);
  }

  .about-support-grid,
  .capability-grid,
  .certifications-grid,
  .skills-grid,
  .contact-card {
    grid-template-columns: 1fr;
  }

  .about-hero {
    margin-bottom: 64px;
  }

  .about-hero-layout {
    grid-template-columns: 1fr;
  }


  .about-section,
  .about-support-grid {
    margin-bottom: 64px;
  }

  .experience-item {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 24px;
  }

  .contact-actions {
    justify-content: stretch;
  }

  .contact-links {
    grid-column: auto;
  }
}

/* Accessibility: Screen Reader Only Utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Accessibility: Prefers Reduced Motion Standard (references/animation.md) */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }

  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .btn-primary:hover,
  .btn-secondary:hover,
  .bento-card:hover,
  .footer-platform-card:hover,
  .about-card:hover,
  .contact-channel-card:hover {
    transform: none !important;
  }
}
