/* ==========================================================
   MAIN CSS - Load asynchronously after critical CSS
   Optimized for performance and responsive design
   ========================================================== */

/* PERFORMANCE: GPU acceleration for animations */
.bg-orb,
.hero-lab__shell::after,
.project-card,
.blog-card {
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* BACKGROUND DECORATIONS */
.site-background {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px),
                    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 140px 140px;
  opacity: 0.35;
}

/* Hide decorative elements on mobile for performance */
@media (max-width: 480px) {
  .bg-grid {
    display: none;
  }
}

.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.7;
  will-change: transform;
  contain: layout style paint;
}

/* Reduce animation complexity on mobile */
@media (min-width: 769px) {
  .bg-orb {
    animation: float 28s infinite linear;
  }
}

@media (max-width: 768px) {
  .bg-orb {
    filter: blur(40px);
    opacity: 0.4;
  }
}

.bg-orb--one {
  width: 520px;
  height: 520px;
  top: -120px;
  right: -180px;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.6), rgba(56, 189, 248, 0.4), transparent 70%);
}

.bg-orb--two {
  width: 420px;
  height: 420px;
  bottom: -140px;
  left: -120px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.55), rgba(16, 185, 129, 0.35), transparent 70%);
  animation-duration: 32s;
}

@keyframes float {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  25% { transform: translate3d(10px, -20px, 0) scale(1.05); }
  50% { transform: translate3d(-12px, 10px, 0) scale(0.97); }
  75% { transform: translate3d(8px, 18px, 0) scale(1.03); }
  100% { transform: translate3d(0, 0, 0) scale(1); }
}

/* CSS VARIABLES */
:root {
  --bg: #050616;
  --bg-elevated: rgba(15, 23, 42, 0.78);
  --bg-alt: rgba(17, 24, 39, 0.85);
  --bg-card: rgba(15, 23, 42, 0.58);
  --glass: rgba(15, 23, 42, 0.6);
  --accent: #fbbf24;
  --accent-soft: rgba(251, 191, 36, 0.18);
  --accent-2: #38bdf8;
  --accent-3: #a855f7;
  --accent-4: #ec4899;
  --accent-5: #10b981;
  --accent-6: #f59e0b;
  --text: #f8fafc;
  --text-muted: rgba(226, 232, 240, 0.75);
  --grid: rgba(148, 163, 184, 0.1);
  --border: rgba(148, 163, 184, 0.18);
  --radius: 22px;
  --radius-sm: 14px;
  --radius-lg: 28px;
  --shadow-md: 0 20px 40px rgba(8, 9, 31, 0.35);
  --shadow-xl: 0 35px 65px rgba(2, 6, 23, 0.52);
  --transition: 0.28s ease;
  --container-width: 1180px;
}

/* BODY GRADIENT - Lower z-index than background */
body {
  background: radial-gradient(circle at 20% 20%, rgba(236, 72, 153, 0.15), transparent 60%),
              radial-gradient(circle at 80% 0%, rgba(56, 189, 248, 0.18), transparent 50%),
              radial-gradient(circle at 50% 80%, rgba(168, 85, 247, 0.12), transparent 60%),
              radial-gradient(circle at 0% 50%, rgba(16, 185, 129, 0.1), transparent 50%),
              #03030d;
}

/* TYPOGRAPHY */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

p {
  margin-bottom: 1.1rem;
}

strong {
  font-weight: 600;
  color: var(--text);
}

code {
  font-family: "IBM Plex Mono", monospace;
  background: rgba(51, 65, 85, 0.45);
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  font-size: 0.85em;
  color: var(--accent-2);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition);
}

/* NAV ENHANCEMENTS */
.nav-link::after {
  content: "";
  position: absolute;
  inset: auto 0 -0.4rem 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

/* Pulsing glow animation */
@keyframes pulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.35); }
}

@media (prefers-reduced-motion: no-preference) {
  .nav-glow {
    animation: pulse 2.8s infinite;
  }
}

/* SEARCH OVERLAY */
.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.8);
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 10vh;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition);
  pointer-events: none;
}

/* Optimize backdrop-filter for performance */
@supports (backdrop-filter: blur(8px)) {
  @media (min-width: 768px) {
    .search-overlay {
      backdrop-filter: blur(8px);
    }
  }
}

@media (max-width: 767px) {
  .search-overlay {
    backdrop-filter: blur(4px);
  }
}

.search-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.search-container {
  width: 90%;
  max-width: 600px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 35px 65px rgba(2, 6, 23, 0.52);
  overflow: hidden;
}

/* Mobile search optimization */
@media (max-width: 640px) {
  .search-overlay {
    padding: 0;
    align-items: stretch;
    justify-content: stretch;
  }
  
  .search-container {
    width: 100%;
    max-width: 100%;
    height: 100vh;
    border-radius: 0;
    margin: 0;
  }
  
  .search-results {
    max-height: calc(100vh - 90px);
  }
  
  .search-input-wrapper {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--bg-elevated);
  }
}

.search-input-wrapper {
  display: flex;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}

.search-input-wrapper svg {
  stroke: var(--text);
}

.search-input-wrapper input {
  flex: 1;
  background: none;
  border: none;
  color: var(--text);
  font-family: inherit;
  font-size: 16px;
  outline: none;
}

.search-results {
  max-height: 400px;
  overflow-y: auto;
  padding: 8px;
  -webkit-overflow-scrolling: touch;
}

/* Search status messages */
.search-loading,
.search-error,
.search-no-results,
.search-hint {
  padding: 16px;
  text-align: center;
  color: var(--text-muted);
  font-style: italic;
}

.search-error {
  color: #ef4444;
}

.search-loading {
  color: var(--accent-2);
}

.search-count {
  padding: 8px 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  font-style: italic;
}

.search-result-item {
  margin-bottom: 8px;
}

.search-result-link {
  display: block;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text);
  transition: transform var(--transition), border-color var(--transition);
}

.search-result-link:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

/* Search result content styling */
.search-result-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.search-result-excerpt {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.search-result-excerpt mark {
  background: rgba(251, 191, 36, 0.3);
  color: var(--accent);
  padding: 1px 2px;
  border-radius: 2px;
}

.search-result-url {
  font-size: 0.8rem;
  color: var(--text-muted);
  opacity: 0.7;
}

/* HERO SECTION ENHANCEMENTS */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero-credentials {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.cred-pill {
  padding: 0.55rem 1.25rem;
  border-radius: 999px;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  background: rgba(148, 163, 184, 0.12);
  color: var(--text-muted);
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.signal-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  background: rgba(56, 189, 248, 0.12);
  color: rgba(191, 219, 254, 0.9);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

/* BUTTON STATES */
.btn:hover {
  transform: translateY(-3px);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #f472b6, #60a5fa, #c084fc);
  box-shadow: 0 24px 55px rgba(236, 72, 153, 0.4), 0 0 30px rgba(56, 189, 248, 0.3);
}

.btn-ghost {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: var(--text);
}

.btn-ghost:hover {
  background: rgba(148, 163, 184, 0.22);
  transform: translateY(-3px);
}

/* SECTIONS */
.section {
  padding: clamp(3rem, 8vw, 5rem) 0;
  contain: layout style;
}

/* Performance: lazy load below-fold sections */
.section:not(:first-of-type) {
  content-visibility: auto;
  contain-intrinsic-size: 500px;
}

.section--alt {
  background: rgba(8, 12, 38, 0.55);
  border-block: 1px solid rgba(88, 110, 156, 0.18);
}

.section-headline {
  max-width: 720px;
  margin-bottom: clamp(2rem, 6vw, 3.5rem);
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
  color: rgba(191, 219, 254, 0.75);
  margin-bottom: 1rem;
}

.section-title {
  font-size: clamp(2rem, 4.5vw, 2.75rem);
  line-height: 1.18;
  margin-bottom: 1rem;
}

.section-description {
  color: var(--text-muted);
  font-size: clamp(1rem, 2vw, 1.1rem);
}

/* CARD GRIDS - Optimized with auto-fit */
.project-gallery,
.blog-list,
.publications-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: clamp(1.5rem, 4vw, 2.5rem);
  contain: layout style;
}

/* CARD STYLES */
.project-card,
.blog-card,
.publication-card {
  position: relative;
  padding: clamp(1.8rem, 4vw, 2.3rem);
  border-radius: var(--radius);
  background: rgba(12, 16, 38, 0.72);
  border: 1px solid rgba(88, 110, 156, 0.26);
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  text-decoration: none;
  color: inherit;
  transition: transform var(--transition), 
              border-color var(--transition), 
              box-shadow var(--transition);
}

/* Simplified shadows on mobile */
@media (min-width: 769px) {
  .project-card,
  .blog-card,
  .publication-card {
    box-shadow: 0 20px 40px rgba(8, 9, 31, 0.35);
  }
  
  .project-card:hover,
  .blog-card:hover,
  .publication-card:hover {
    box-shadow: 0 35px 65px rgba(236, 72, 153, 0.25);
  }
}

@media (max-width: 768px) {
  .project-card,
  .blog-card,
  .publication-card {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }
  
  .project-card:hover,
  .blog-card:hover,
  .publication-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }
}

.project-card:hover,
.blog-card:hover,
.publication-card:hover {
  transform: translateY(-4px);
  border-color: rgba(236, 72, 153, 0.5);
}

.project-meta,
.blog-meta,
.publication-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: "IBM Plex Mono", monospace;
  font-size: clamp(0.75rem, 2vw, 0.85rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(191, 219, 254, 0.6);
  flex-wrap: wrap;
  gap: 0.5rem;
}

.project-title,
.blog-title,
.publication-title {
  font-size: clamp(1.3rem, 3vw, 1.6rem);
  line-height: 1.3;
}

.project-body,
.blog-excerpt,
.publication-excerpt {
  color: var(--text-muted);
  font-size: 0.97rem;
  line-height: 1.7;
  flex-grow: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.project-tags span {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.15), rgba(168, 85, 247, 0.15));
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  color: #f0abfc;
  font-size: 0.75rem;
}

.project-links {
  display: flex;
  gap: 0.8rem;
  margin-top: auto;
  flex-wrap: wrap;
}

.project-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  border: 1px solid rgba(88, 110, 156, 0.3);
  background: rgba(56, 189, 248, 0.1);
  transition: background var(--transition), 
              border-color var(--transition),
              transform var(--transition);
  font-size: 0.85rem;
  flex: 1;
  min-width: 120px;
  min-height: 44px;
}

.project-link:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: rgba(56, 189, 248, 0.5);
  transform: translateY(-2px);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

p {
  margin-bottom: 1.1rem;
}

strong {
  font-weight: 600;
  color: var(--text);
}

code {
  font-family: "IBM Plex Mono", monospace;
  background: rgba(51, 65, 85, 0.45);
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  font-size: 0.85em;
  color: var(--accent-2);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition), transform var(--transition);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

ul {
  list-style: none;
}

/* FOOTER */
.site-footer {
  padding: clamp(3.5rem, 8vw, 5rem) 0 clamp(2rem, 5vw, 3rem);
  background: rgba(2, 4, 20, 0.9);
  border-top: 1px solid rgba(88, 110, 156, 0.26);
}

.footer-content {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 4vw, 3rem);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: clamp(2rem, 5vw, 3.2rem);
}

.footer-label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(191, 219, 254, 0.7);
}

.footer-brand {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  line-height: 1.25;
  margin: 0.6rem 0 1rem;
}

.social-links {
  display: flex;
  gap: 0.9rem;
}

.social-links a {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.26);
  color: var(--text);
  transition: transform var(--transition), 
              border-color var(--transition), 
              background var(--transition);
}

.social-links a:hover {
  transform: translateY(-4px);
  border-color: rgba(251, 191, 36, 0.4);
  background: rgba(251, 191, 36, 0.2);
  color: var(--accent);
}

/* FORM ELEMENTS */
.form-input,
.form-select,
.form-textarea {
  background: var(--bg-secondary);
  border: 1px solid rgba(88, 110, 156, 0.2);
  border-radius: 6px;
  padding: 0.6rem;
  color: var(--text);
  font-family: inherit;
  transition: border-color var(--transition), box-shadow var(--transition);
  min-height: 44px;
}

/* Prevent iOS zoom */
@media (max-width: 640px) {
  .form-input,
  .form-select,
  .form-textarea {
    font-size: 16px !important;
  }
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(236, 72, 153, 0.1);
}

/* ACCESSIBILITY */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media (prefers-contrast: high) {
  :root {
    --border: rgba(255, 255, 255, 0.3);
    --text-muted: rgba(255, 255, 255, 0.9);
  }
  
  .btn {
    border-width: 2px;
  }
}

/* PRINT STYLES */
@media print {
  .hero-lab,
  .nav-menu,
  .footer-cta,
  .btn,
  .contact-form,
  .bg-grid,
  .bg-orb {
    display: none !important;
  }
  
  body {
    font-size: 12pt;
    color: #000;
    background: #fff;
  }
  
  .project-card,
  .blog-card,
  .publication-card {
    break-inside: avoid;
  }
}

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 4vw, 3rem);
}

.site-background {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px),
                    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 140px 140px;
  opacity: 0.35;
}

.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.7;
  animation: float 28s infinite linear;
}

.bg-orb--one {
  width: 520px;
  height: 520px;
  top: -120px;
  right: -180px;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.6), rgba(56, 189, 248, 0.4), transparent 70%);
  animation-delay: 0.5s;
}

.bg-orb--two {
  width: 420px;
  height: 420px;
  bottom: -140px;
  left: -120px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.55), rgba(16, 185, 129, 0.35), transparent 70%);
  animation-duration: 32s;
}

@keyframes float {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  25% { transform: translate3d(10px, -20px, 0) scale(1.05); }
  50% { transform: translate3d(-12px, 10px, 0) scale(0.97); }
  75% { transform: translate3d(8px, 18px, 0) scale(1.03); }
  100% { transform: translate3d(0, 0, 0) scale(1); }
}

.site-frame {
  position: relative;
  min-height: 100vh;
}

/* NAVIGATION */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  background: rgba(3, 6, 21, 0.7);
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.nav-shell {
  display: flex;
  align-items: center;
  padding: 1.2rem 3rem;
}

/* CONTENT CONTAINER */
.nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  flex: 1;
}

/* RIGHT SIDE MENU */
.nav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* UTILITY LAYER */
.nav-utility {
  position: absolute;
  right: 3rem;
  display: flex;
  align-items: center;
}

.nav-brand {
  flex-shrink: 0;
}

.nav-brand a {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  position: relative;
}

.nav-glow {
  width: 9px;
  height: 9px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 18px var(--accent);
  animation: pulse 2.8s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.35); }
}

.nav-menu {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  transition: color var(--transition);
}

.nav-link::after {
  content: "";
  position: absolute;
  inset: auto 0 -0.4rem 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.main-content {
  padding-top: clamp(2rem, 6vw, 4rem);
  padding-bottom: clamp(4rem, 8vw, 6rem);
}

/* BUTTONS */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.9rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  border: 1px solid transparent;
  color: var(--text);
}

.btn-primary {
  background: linear-gradient(135deg, #ec4899, #38bdf8, #a855f7);
  color: #050616;
  box-shadow: 0 18px 40px rgba(236, 72, 153, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  background: linear-gradient(135deg, #f472b6, #60a5fa, #c084fc);
  box-shadow: 0 24px 55px rgba(236, 72, 153, 0.4), 0 0 30px rgba(56, 189, 248, 0.3);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
  background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
  color: #cbd5e1;
  border: 1px solid rgba(100, 116, 139, 0.3);
}

.btn-primary:disabled:hover {
  transform: none;
  box-shadow: none;
  background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
}

.btn-ghost {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: var(--text);
}

.btn-ghost:hover {
  background: rgba(148, 163, 184, 0.22);
  transform: translateY(-3px);
}

/* HERO */

.hero {
  padding: clamp(3.5rem, 8vw, 6rem) 0 clamp(2rem, 6vw, 4rem);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}

.hero-intro {
  display: flex;
  flex-direction: column;
  gap: clamp(1.5rem, 4vw, 2.3rem);
}

.about-preview {
  display: flex;
  align-items: center;
  gap: 3rem;
  padding: 3rem 0;
}

.about-image {
  flex-shrink: 0;
}

.about-profile-image {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(56, 189, 248, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  transition: all var(--transition);
}

.about-profile-image:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 40px rgba(56, 189, 248, 0.3);
}

.about-content {
  flex: 1;
}

.about-title {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1rem;
}

.about-description {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

@media (max-width: 768px) {
  .about-preview {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
  }
  
  .about-profile-image {
    width: 160px;
    height: 160px;
  }
  
  .publications-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

.signal-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  background: rgba(56, 189, 248, 0.12);
  color: rgba(191, 219, 254, 0.9);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.hero-title {
  font-size: clamp(2.6rem, 6vw, 3.9rem);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.hero-subtitle {
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  color: var(--text-muted);
  max-width: 620px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero-credentials {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.cred-pill {
  padding: 0.55rem 1.25rem;
  border-radius: 999px;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  background: rgba(148, 163, 184, 0.12);
  color: var(--text-muted);
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.hero-lab {
  position: relative;
}

.hero-lab__shell {
  position: relative;
  padding: clamp(2.5rem, 6vw, 3.5rem);
  border-radius: var(--radius-lg);
  background: linear-gradient(140deg, rgba(15, 23, 42, 0.75), rgba(2, 6, 23, 0.8));
  border: 1px solid rgba(88, 110, 156, 0.3);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}

.hero-lab__shell::after {
  content: "";
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  border: 1px dashed rgba(148, 163, 184, 0.25);
  animation: rotate 18s linear infinite;
}

.lab-orb {
  position: relative;
  border-radius: var(--radius);
  padding: 1.1rem 1.4rem;
  background: rgba(22, 29, 55, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 18px 32px rgba(2, 6, 23, 0.38);
  max-width: 230px;
  font-size: 0.9rem;
}

.lab-orb span {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.lab-orb small {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  color: rgba(226, 232, 240, 0.6);
}

.lab-orb--core {
  max-width: none;
  padding: clamp(2.3rem, 5vw, 2.8rem);
  text-align: left;
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.25), rgba(15, 23, 42, 0.92));
  border: 1px solid rgba(56, 189, 248, 0.4);
}

.lab-tag {
  display: inline-block;
  background: rgba(251, 191, 36, 0.18);
  color: var(--accent);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  margin-bottom: 0.9rem;
}

.lab-orb--one,
.lab-orb--two,
.lab-orb--three {
  position: absolute;
}

.lab-orb--one {
  top: 6%;
  right: 8%;
  transform: rotate(3deg);
}

.lab-orb--two {
  bottom: 12%;
  right: 12%;
  transform: rotate(-4deg);
}

.lab-orb--three {
  bottom: 8%;
  left: 8%;
  transform: rotate(6deg);
}

.hero-lab__caption {
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: rgba(226, 232, 240, 0.7);
  max-width: 320px;
}

@keyframes rotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* SECTIONS */

.section {
  padding: clamp(3rem, 8vw, 5rem) 0;
}

.section--alt {
  background: rgba(8, 12, 38, 0.55);
  border-block: 1px solid rgba(88, 110, 156, 0.18);
}

.section-headline {
  max-width: 720px;
  margin-bottom: clamp(2rem, 6vw, 3.5rem);
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
  color: rgba(191, 219, 254, 0.75);
  margin-bottom: 1rem;
}

.section-title {
  font-size: clamp(2rem, 4.5vw, 2.75rem);
  line-height: 1.18;
  margin-bottom: 1rem;
}

.section-description {
  color: var(--text-muted);
  font-size: clamp(1rem, 2vw, 1.1rem);
}

/* PERSONA SWITCHER */

.persona-switcher {
  background: rgba(9, 12, 32, 0.6);
  border: 1px solid rgba(88, 110, 156, 0.28);
  border-radius: var(--radius-lg);
  padding: clamp(1.8rem, 4vw, 2.6rem);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(18px);
}

.persona-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: clamp(1.8rem, 4vw, 2.4rem);
}

.persona-tab {
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.45);
  color: rgba(226, 232, 240, 0.7);
  border-radius: 999px;
  padding: 0.65rem 1.4rem;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border var(--transition), transform var(--transition);
}

.persona-tab:hover {
  transform: translateY(-2px);
  border-color: rgba(251, 191, 36, 0.4);
}

.persona-tab.is-active {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.16), rgba(56, 189, 248, 0.18));
  border-color: rgba(251, 191, 36, 0.5);
  color: var(--text);
  box-shadow: 0 12px 24px rgba(56, 189, 248, 0.18);
}

.persona-panels {
  position: relative;
}

.persona-panel {
  display: none;
}

.persona-panel.is-active {
  display: block;
  animation: fadeIn 0.32s ease;
}

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

.panel-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: clamp(1.8rem, 4vw, 2.6rem);
}

.panel-card {
  background: rgba(12, 16, 38, 0.75);
  border: 1px solid rgba(88, 110, 156, 0.28);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 4vw, 2rem);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: var(--shadow-md);
}

.panel-title {
  font-size: 1.4rem;
  line-height: 1.25;
}

.panel-card p {
  color: var(--text-muted);
}

.panel-list {
  display: grid;
  gap: 0.8rem;
  color: rgba(226, 232, 240, 0.74);
  font-size: 0.95rem;
}

.panel-list li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.panel-list li::before {
  content: "◆";
  font-size: 0.7rem;
  color: var(--accent);
}

@media (min-width: 900px) {
  .about-section--what-i-do .about-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 2rem;
  }
}

.stack-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.stack-badges span {
  background: rgba(251, 191, 36, 0.12);
  color: var(--accent);
  border: 1px solid rgba(251, 191, 36, 0.3);
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

/* PROJECTS */

.project-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(2rem, 5vw, 3rem);
  width: 100%;
  max-width: none;
  margin: 0;
}

@media (max-width: 899px) and (min-width: 600px) {
  .project-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 599px) {
  .project-gallery {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

.project-card {
  position: relative;
  padding: clamp(2.2rem, 5vw, 2.8rem);
  border-radius: var(--radius);
  background: rgba(12, 16, 38, 0.72);
  border: 1px solid rgba(88, 110, 156, 0.26);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  height: 100%;
  transition: transform var(--transition), border var(--transition), box-shadow var(--transition);
  text-decoration: none;
  color: inherit;
  min-height: 400px;
}

.project-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.12), rgba(56, 189, 248, 0.12), rgba(168, 85, 247, 0.1));
  opacity: 0;
  transition: opacity var(--transition);
  z-index: -1;
}

.project-card:hover {
  transform: translateY(-10px);
  border-color: rgba(236, 72, 153, 0.5);
  box-shadow: 0 35px 65px rgba(236, 72, 153, 0.25), var(--shadow-xl);
  text-decoration: none;
  color: inherit;
}

.project-card:focus {
  outline: 2px solid var(--accent-3);
  outline-offset: 2px;
}

.project-card:hover::before {
  opacity: 1;
}

.project-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(191, 219, 254, 0.6);
  flex-wrap: wrap;
  gap: 0.5rem;
}

.project-label {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.2), rgba(56, 189, 248, 0.2));
  color: #f472b6;
  padding: 0.3rem 0.6rem;
  border-radius: 8px;
}

.project-badge {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(251, 146, 60, 0.2));
  color: #fbbf24;
  padding: 0.3rem 0.6rem;
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.project-year {
  color: rgba(191, 219, 254, 0.5);
}

.project-title {
  font-size: 1.6rem;
  line-height: 1.3;
}

.project-body {
  color: var(--text-muted);
  font-size: 0.97rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  color: var(--accent);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-tags span {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.15), rgba(168, 85, 247, 0.15));
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  color: #f0abfc;
}

.project-links {
  display: flex;
  gap: 0.8rem;
  margin-top: auto;
  flex-wrap: wrap;
  align-items: stretch;
}

.project-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-weight: 600;
  margin-top: 0;
  color: var(--accent);
  text-decoration: none;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  border: 1px solid rgba(88, 110, 156, 0.3);
  background: rgba(56, 189, 248, 0.1);
  transition: all var(--transition);
  font-size: 0.85rem;
  flex: 1;
  min-width: 120px;
  text-align: center;
}

.project-link:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: rgba(56, 189, 248, 0.5);
  transform: translateY(-2px);
}

.project-link--github {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.3);
  color: #22c55e;
}

.project-link--github:hover {
  background: rgba(34, 197, 94, 0.2);
  border-color: rgba(34, 197, 94, 0.5);
}

.project-link--demo {
  background: rgba(236, 72, 153, 0.1);
  border-color: rgba(236, 72, 153, 0.3);
  color: #ec4899;
}

.project-link--demo:hover {
  background: rgba(236, 72, 153, 0.2);
  border-color: rgba(236, 72, 153, 0.5);
}

.project-links {
  display: flex;
  gap: 0.8rem;
  margin-top: auto;
  flex-wrap: wrap;
}

.project-link::after {
  content: "↗";
  font-size: 1.1rem;
}

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

.section-cta {
  margin-top: clamp(1rem, 3vw, 1.5rem);
  margin-bottom: 0;
  display: flex;
  justify-content: center;
}

/* Reduce spacing when a section with CTA is followed by another section */
.section:has(.section-cta) + .section {
  padding-top: clamp(1.5rem, 4vw, 2.5rem);
}

/* STACK GRID */

.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(1.4rem, 4vw, 2.2rem);
}

.stack-card {
  background: rgba(12, 15, 35, 0.7);
  border: 1px solid rgba(88, 110, 156, 0.26);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 4vw, 2.1rem);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  transition: transform var(--transition), border var(--transition), background var(--transition);
}

.stack-card:hover {
  transform: translateY(-6px);
  border-color: rgba(56, 189, 248, 0.35);
  background: rgba(15, 23, 42, 0.85);
}

.stack-card p {
  color: var(--text-muted);
}

.stack-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.stack-list span {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px dashed rgba(148, 163, 184, 0.35);
  color: rgba(226, 232, 240, 0.75);
}

/* INSIGHTS */

.insight-stream {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(1.4rem, 4vw, 2.2rem);
}

.insight-card {
  padding: clamp(1.6rem, 4vw, 2.1rem);
  background: rgba(10, 12, 32, 0.72);
  border-radius: var(--radius);
  border: 1px solid rgba(88, 110, 156, 0.24);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition), border var(--transition), box-shadow var(--transition);
}

.insight-card::before {
  content: "";
  position: absolute;
  inset: -20% 30% 60% -40%;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.28), transparent 65%);
  opacity: 0;
  transition: opacity var(--transition);
}

.insight-card:hover {
  transform: translateY(-8px);
  border-color: rgba(168, 85, 247, 0.4);
  box-shadow: var(--shadow-md);
}

.insight-card:hover::before {
  opacity: 1;
}

.insight-tag {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(168, 85, 247, 0.18);
  color: var(--accent-3);
  width: fit-content;
}

.insight-card h3 {
  font-size: 1.2rem;
}

.insight-card p {
  color: var(--text-muted);
  flex-grow: 1;
}

.insight-link {
  font-weight: 600;
  color: var(--accent-3);
}

.insight-card:hover .insight-link {
  transform: translateX(5px);
}

/* FOOTER */

.site-footer {
  padding: clamp(3.5rem, 8vw, 5rem) 0 clamp(2rem, 5vw, 3rem);
  background: rgba(2, 4, 20, 0.9);
  border-top: 1px solid rgba(88, 110, 156, 0.26);
  margin-top: clamp(0.5rem, 1.5vw, 1rem);
}

/* Reduce bottom padding on last section before footer */
.section:last-of-type {
  padding-bottom: clamp(0.5rem, 1.5vw, 1rem);
}

.footer-content {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 4vw, 3rem);
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 3.2rem);
}

.footer-label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(191, 219, 254, 0.7);
}

.footer-brand {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  line-height: 1.25;
  margin: 0.6rem 0 1rem;
}

.footer-tagline {
  color: rgba(191, 219, 254, 0.68);
  font-size: 1rem;
  max-width: 520px;
  margin-bottom: 1.3rem;
}

.footer-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.16);
  color: var(--accent);
  font-weight: 600;
  border: 1px solid rgba(251, 191, 36, 0.32);
  transition: transform var(--transition), background var(--transition);
}

.footer-cta:hover {
  transform: translateY(-3px);
  background: rgba(251, 191, 36, 0.25);
}

.footer-meta {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: flex-end;
}

.footer-metrics {
  display: grid;
  gap: 0.6rem;
  text-align: right;
  font-size: 0.9rem;
  color: rgba(191, 219, 254, 0.65);
}

.footer-metrics span {
  font-weight: 600;
  color: var(--text);
}

.social-links {
  display: flex;
  gap: 0.9rem;
}

.social-links a {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.26);
  color: var(--text);
  transition: transform var(--transition), border var(--transition), background var(--transition);
}

.social-links a:hover {
  transform: translateY(-4px);
  border-color: rgba(251, 191, 36, 0.4);
  background: rgba(251, 191, 36, 0.2);
  color: var(--accent);
}

.footer-bottom {
  max-width: var(--container-width);
  margin: clamp(2rem, 5vw, 3rem) auto 0;
  padding: clamp(1.2rem, 3vw, 1.8rem) clamp(1.5rem, 4vw, 3rem) 0;
  border-top: 1px solid rgba(88, 110, 156, 0.18);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: rgba(148, 163, 184, 0.65);
  font-size: 0.85rem;
}

.footer-bottom p {
  margin: 0;
}

/* RESPONSIVE */

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

  .hero-lab__caption {
    max-width: none;
  }

  .panel-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }

  .footer-meta {
    align-items: flex-start;
    text-align: left;
  }

  .footer-metrics {
    text-align: left;
  }
}

@media (max-width: 820px) {
  .nav-menu {
    gap: 1.2rem;
    font-size: 0.85rem;
  }

  .hero-intro {
    gap: 1.5rem;
  }

  .hero-lab__shell::after {
    inset: 18%;
  }

  .lab-orb--one,
  .lab-orb--two,
  .lab-orb--three {
    position: static;
    transform: none;
    margin-top: 1.2rem;
  }

  .lab-orb {
    max-width: none;
  }

  .hero-lab__shell {
    display: grid;
    gap: 1.2rem;
  }

  .hero-lab__shell::after {
    display: none;
  }
}

/* Hide hamburger on desktop */
.nav-toggle {
  display: none;
}

@media (max-width: 640px) {
  .nav-shell {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 1.2rem 1rem;
  }

  .nav-utility {
    position: static;
    right: auto;
    margin-left: auto;
  }

  .nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 2.5rem;
    height: 2.5rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1000;
  }

  .hamburger-line {
    width: 1.5rem;
    height: 2px;
    background-color: var(--text);
    margin: 2px 0;
    transition: all 0.3s ease;
    transform-origin: center;
  }

  .nav-toggle[aria-expanded="true"] .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav-toggle[aria-expanded="true"] .hamburger-line:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle[aria-expanded="true"] .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: var(--bg-elevated);
    backdrop-filter: blur(20px);
    border-left: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    padding: 4rem 1.5rem 2rem;
    gap: 1rem;
    transition: right 0.3s ease;
    z-index: 999;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .nav-menu.is-open {
    right: 0;
  }

  .nav-menu li {
    margin: 0 !important;
    width: 100%;
  }

  .nav-link {
    display: block;
    padding: 0.8rem 1rem;
    border-radius: var(--radius-sm);
    transition: background-color 0.2s ease;
    font-size: 0.9rem;
    font-weight: 500;
  }

  .nav-link:hover {
    background-color: var(--bg-card);
  }

  .hero-actions,
  .hero-credentials {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }
  
  .hero-grid {
    gap: 2rem;
  }
  
  .hero-title {
    font-size: clamp(2rem, 5vw, 2.8rem);
  }
  
  .hero-subtitle {
    font-size: clamp(0.95rem, 1.8vw, 1.1rem);
  }
  
  .blog-list {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .contact-form-section,
  .contact-method {
    padding: 1.5rem;
  }
  
  .contact-content {
    gap: 1.5rem;
  }
  
  .form-group.inline {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
  }
  
  .form-group.inline .form-label {
    min-width: auto;
    margin-bottom: 0.5rem;
  }
  
  .form-input,
  .form-select,
  .form-textarea {
    min-width: 100%;
    font-size: 0.85rem;
  }
  
  .form-select {
    min-width: 100%;
    padding-right: 2.5rem;
  }
}

@media (max-width: 480px) {
  .nav-shell {
    padding: 1rem 0.75rem;
  }

  .nav-brand a {
    font-size: 1rem;
  }

  .search-container-nav {
    padding: 3px 6px;
    gap: 4px;
  }

  .search-label {
    display: none;
  }

  .hero {
    padding: clamp(2rem, 6vw, 3rem) 0 clamp(1.5rem, 4vw, 2rem);
  }
  
  .hero-lab__shell {
    padding: 1.5rem;
  }
  
  .project-card {
    padding: 1.2rem;
  }
  
  .contact-form-section,
  .contact-method {
    padding: 1rem;
  }
  
  .btn {
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
  }
  
  .persona-tabs {
    flex-direction: column;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 0.8rem;
    text-align: center;
  }
}

@media (max-width: 900px) and (min-width: 768px) {
  .hero-grid {
    gap: 3rem;
  }
  
  .contact-content {
    gap: 2rem;
  }
}

/* BLOG LIST */

.category-section {
  margin-bottom: clamp(3rem, 6vw, 4rem);
}

.category-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  color: var(--accent);
  margin-bottom: clamp(1.5rem, 3vw, 2rem);
  position: relative;
  padding-left: 1rem;
}

.category-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 1.2em;
  background: linear-gradient(135deg, var(--accent), rgba(56, 189, 248, 0.6));
  border-radius: 2px;
}

.blog-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.5rem, 4vw, 2.5rem);
  width: 100%;
  max-width: none;
}

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

.blog-card {
  background: rgba(12, 16, 38, 0.72);
  border: 1px solid rgba(88, 110, 156, 0.26);
  border-radius: var(--radius);
  padding: clamp(1.8rem, 4vw, 2.3rem);
  transition: all var(--transition);
  color: inherit;
  text-decoration: none;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  border-color: rgba(236, 72, 153, 0.5);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.blog-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
}

.blog-meta-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.blog-tag {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.2), rgba(56, 189, 248, 0.2));
  color: #f472b6;
  padding: 0.3rem 0.6rem;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

.blog-date {
  color: var(--text-muted);
}

.blog-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 0.8rem;
  color: var(--text);
}

.blog-excerpt {
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.7;
  flex-grow: 1;
}

.blog-card-image {
  margin-bottom: 1.5rem;
  border-radius: calc(var(--radius) * 0.75);
  overflow: hidden;
}

.blog-card-image img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform var(--transition);
}

.blog-card:hover .blog-card-image img {
  transform: scale(1.05);
}

.blog-category-section {
  margin-bottom: clamp(3rem, 6vw, 4rem);
}

.category-header {
  font-size: clamp(1.8rem, 4vw, 2.2rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid rgba(88, 110, 156, 0.2);
}

.blog-badge {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-right: 0;
}

.blog-link {
  color: var(--accent);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

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

/* BLOG POST */

.blog-post {
  max-width: 800px;
  margin: 0 auto;
}

.blog-post-header {
  margin-bottom: clamp(2rem, 5vw, 3rem);
  padding-bottom: clamp(1.5rem, 4vw, 2rem);
  border-bottom: 1px solid var(--border);
}

.blog-post-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
}

.blog-post-tag {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.2), rgba(56, 189, 248, 0.2));
  color: #f472b6;
  padding: 0.3rem 0.6rem;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.blog-post-date {
  color: var(--text-muted);
}

.blog-post-title {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.blog-post-description {
  font-size: 1.2rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.blog-post-content {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text);
}

.blog-post-content ul,
.blog-post-content ol {
  margin: 0 0 1.2rem 1.5rem;
  padding-left: 0;
}

.blog-post-content ul {
  list-style: disc;
}

.blog-post-content ol {
  list-style: decimal;
}

.blog-post-content li + li {
  margin-top: 0.3rem;
}

.blog-post-content h2 {
  font-size: 2rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.blog-post-content h3 {
  font-size: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 0.8rem;
}

.blog-post-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin: 2rem 0;
}

.blog-post-content a {
  color: var(--accent-2);
  text-decoration: underline;
}

.blog-post-content a:hover {
  color: var(--accent);
}

.blog-post-footer {
  margin-top: clamp(2rem, 5vw, 3rem);
  padding-top: clamp(1.5rem, 4vw, 2rem);
  border-top: 1px solid var(--border);
}

.blog-post-back {
  color: var(--accent);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.blog-post-back:hover {
  transform: translateX(-4px);
}

/* PUBLICATIONS */

.publications-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.5rem, 4vw, 2.5rem);
}

.publication-card {
  background: rgba(12, 16, 38, 0.72);
  border: 1px solid rgba(88, 110, 156, 0.26);
  border-radius: var(--radius);
  padding: clamp(1.8rem, 4vw, 2.3rem);
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.publication-card:hover {
  border-color: rgba(236, 72, 153, 0.5);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
  color: inherit;
}

.publication-card:focus {
  outline: 2px solid var(--accent-3);
  outline-offset: 2px;
}

.publication-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
}

.publication-venue {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(16, 185, 129, 0.2));
  color: #c084fc;
  padding: 0.3rem 0.6rem;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.publication-date {
  color: var(--text-muted);
}

.publication-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 0.8rem;
}

.publication-title a {
  color: var(--text);
  transition: color var(--transition);
}

.publication-title a:hover {
  color: var(--accent-3);
}

.publication-excerpt {
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.7;
  flex-grow: 1;
}

.publication-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.publication-tag {
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  background: rgba(56, 189, 248, 0.15);
  color: #60a5fa;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

/* CONTACT PAGE */

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.contact-form-section {
  background: rgba(56, 189, 248, 0.05);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 12px;
  padding: 1.5rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.form-group.inline {
  flex-direction: row;
  align-items: center;
  gap: 1rem;
}

.form-group.inline .form-label {
  min-width: 80px;
  margin-bottom: 0;
}

.form-message {
  margin-top: 1rem;
  padding: 0.8rem;
  border-radius: 6px;
  font-size: 0.9rem;
  text-align: center;
}

.form-label {
  font-weight: 600;
  color: var(--text);
  font-size: 0.85rem;
}

.form-input,
.form-select,
.form-textarea {
  background: var(--bg-secondary);
  border: 1px solid rgba(88, 110, 156, 0.2);
  border-radius: 6px;
  padding: 0.6rem;
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 0.9rem;
  transition: all var(--transition);
  flex: 1;
  min-width: 250px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  outline: none;
}

.form-input {
  background-image: none;
  -webkit-autofill: #38bdf8;
  -webkit-box-shadow: 0 0 0 1000px var(--bg-secondary) inset;
  box-shadow: 0 0 0 1000px var(--bg-secondary) inset;
  -webkit-text-fill-color: var(--text);
}

.form-select {
  min-width: 280px;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.5rem center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
  padding-right: 2.5rem;
}

.form-select option {
  background: var(--bg-secondary);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 0.9rem;
  padding: 0.5rem;
}

.form-select option:hover,
.form-select option:focus {
  background: rgba(56, 189, 248, 0.1);
  color: var(--accent);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.5;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

.form-input:-webkit-autofill,
.form-input:-webkit-autofill:hover,
.form-input:-webkit-autofill:focus,
.form-input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px var(--bg-secondary) inset;
  -webkit-text-fill-color: var(--text);
  transition: background-color 5000s ease-in-out 0s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(236, 72, 153, 0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.social-icons {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: rgba(56, 189, 248, 0.2);
  color: var(--text);
  transition: all var(--transition);
  border: 1px solid rgba(56, 189, 248, 0.4);
}

.social-icon svg {
  width: 20px;
  height: 20px;
}

.social-icon:hover {
  background: rgba(56, 189, 248, 0.2);
  color: var(--accent);
  transform: translateY(-2px);
}

@media (max-width: 968px) {
  .contact-content {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .form-group.inline {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
  }
  
  .form-group.inline .form-label {
    min-width: auto;
    margin-bottom: 0.5rem;
  }
}

@media (max-width: 768px) {
  .contact-content {
    gap: 2rem;
  }
  
  .contact-form-section,
  .contact-method {
    padding: 2rem;
  }
  
  .form-input,
  .form-select,
  .form-textarea {
    min-width: 100%;
  }
  
  .form-select {
    min-width: 100%;
    padding-right: 2.5rem;
  }
}

.contact-content {
  max-width: 900px;
  margin: 0 auto;
}

.contact-methods {
  display: grid;
  gap: clamp(2rem, 5vw, 3rem);
  margin-bottom: clamp(2rem, 5vw, 3rem);
}

.contact-method h2 {
  font-size: 1.5rem;
  margin-bottom: 0.8rem;
  color: var(--text);
}

.contact-method p {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.contact-link {
  color: var(--accent-2);
  font-size: 1.1rem;
  font-weight: 600;
  display: inline-block;
  transition: transform var(--transition);
}

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

.social-links-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  padding: 0.6rem 1.2rem;
  background: rgba(12, 16, 38, 0.72);
  border: 1px solid rgba(88, 110, 156, 0.26);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.social-link:hover {
  border-color: var(--accent-2);
  color: var(--accent-2);
  transform: translateY(-2px);
}

.availability-list {
  list-style: none;
  padding: 0;
}

.availability-list li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
  color: var(--text-muted);
}

.availability-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.contact-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ABOUT PAGE */

.about-content {
  max-width: 1040px;
  margin: 0 auto;
}

.about-intro {
  margin-bottom: clamp(1rem, 2.5vw, 1.5rem);
  display: flex;
  align-items: flex-start;
  gap: clamp(1.5rem, 4vw, 2.5rem);
}

.about-intro-text {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.about-lead {
  font-size: 1.3rem;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 1.5rem;
}

.about-profile {
  margin: 0;
  flex-shrink: 0;
}

.about-profile img {
  display: block;
  width: 100%;
  max-width: 180px;
  border-radius: 9999px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  box-shadow: var(--shadow-md);
}

@media (max-width: 900px) {
  .about-intro {
    flex-direction: column;
    align-items: flex-start;
  }
}

.about-sections {
  display: grid;
  gap: clamp(1rem, 2.5vw, 1.5rem);
}

.about-section {
  margin-bottom: clamp(1rem, 2.5vw, 1.5rem);
}

.about-section--what-i-do {
  padding: clamp(1.5rem, 4vw, 2rem);
  border-radius: var(--radius);
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.12), rgba(15, 23, 42, 0.9));
  border: 1px solid rgba(88, 110, 156, 0.35);
  box-shadow: var(--shadow-md);
}

.about-whatido-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.6fr);
  grid-auto-rows: auto;
  row-gap: clamp(1.5rem, 4vw, 2.5rem);
  column-gap: clamp(1.5rem, 4vw, 2.5rem);
  align-items: start;
}

.about-whatido-header {
  grid-column: 1 / 3; /* span both columns */
}

.about-whatido-visual {
  margin: 0;
  grid-column: 1;
  grid-row: 2;
  align-self: stretch; /* image column spans height of content */
}

.about-whatido-visual img {
  display: block;
  width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(88, 110, 156, 0.4);
  box-shadow: var(--shadow-md);
}

.about-whatido-text {
  display: flex;
  flex-direction: column;
}

.about-whatido-body {
  grid-column: 2;
  grid-row: 2;
}

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

  .about-whatido-header,
  .about-whatido-visual,
  .about-whatido-body {
    grid-column: 1;
  }
}

.about-section:last-child {
  margin-bottom: 0;
}

.about-section h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.about-section--what-i-do h2 {
  position: relative;
  padding-left: 0.9rem;
}

.about-section--what-i-do h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2rem;
  bottom: 0.2rem;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
}

.about-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.about-list li {
  padding: 0.8rem 0;
  padding-left: 1.8rem;
  position: relative;
  color: var(--text-muted);
  line-height: 1.7;
}

.about-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.work-timeline {
  display: grid;
  gap: 2rem;
  margin: 1.5rem 0;
}

.work-item {
  padding: 1.5rem;
  background: rgba(12, 16, 38, 0.5);
  border: 1px solid rgba(88, 110, 156, 0.2);
  border-radius: var(--radius);
}

.work-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.85rem;
}

.work-company {
  font-weight: 600;
  color: var(--accent-2);
}

.work-period {
  color: var(--text-muted);
}

.work-description {
  color: var(--text-muted);
  line-height: 1.7;
}

.about-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

/* ============================================
   EXPERTISE SHOWCASE - DESIGN OPTIONS
   ============================================ */

/* OPTION 1: Icon + Badge Tags */
.expertise-grid.option-1 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

.expertise-grid.option-1 .expertise-item {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  height: 100%;
}

.expertise-grid.option-1 .expertise-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.expertise-grid.option-1 .expertise-icon {
  font-size: 1.75rem;
  flex-shrink: 0;
}

.expertise-grid.option-1 .expertise-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
}

.expertise-grid.option-1 .expertise-description {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.expertise-grid.option-1 .expertise-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.expertise-grid.option-1 .expertise-tag {
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  background: rgba(236, 72, 153, 0.15);
  color: var(--accent-4);
  border-radius: 999px;
  border: 1px solid rgba(236, 72, 153, 0.3);
}

/* OPTION 2: Timeline/Flow Style */
.expertise-grid.option-2 {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: relative;
  padding-left: 2rem;
}

.expertise-grid.option-2::before {
  content: "";
  position: absolute;
  left: 0.75rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, rgba(236, 72, 153, 0.4), rgba(56, 189, 248, 0.4));
}

.expertise-grid.option-2 .expertise-item {
  display: flex;
  gap: 1.25rem;
  position: relative;
}

.expertise-grid.option-2 .expertise-header {
  display: none;
}

.expertise-grid.option-2 .expertise-icon {
  font-size: 2rem;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(12, 16, 38, 0.8);
  border-radius: 50%;
  border: 2px solid rgba(236, 72, 153, 0.4);
  flex-shrink: 0;
  position: absolute;
  left: -2.75rem;
}

.expertise-grid.option-2 .expertise-content {
  flex: 1;
}

.expertise-grid.option-2 .expertise-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.expertise-grid.option-2 .expertise-description {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* OPTION 3: Interactive Hover Reveal */
.expertise-grid.option-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

.expertise-grid.option-3 .expertise-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.5rem;
  cursor: pointer;
  transition: all var(--transition);
}

.expertise-grid.option-3 .expertise-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.expertise-grid.option-3 .expertise-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  transition: transform var(--transition);
}

.expertise-grid.option-3 .expertise-item:hover .expertise-icon {
  transform: scale(1.15) rotate(5deg);
}

.expertise-grid.option-3 .expertise-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.expertise-grid.option-3 .expertise-description {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease, margin-top 0.3s ease;
  margin-top: 0;
}

.expertise-grid.option-3 .expertise-item:hover .expertise-description {
  max-height: 200px;
  opacity: 1;
  margin-top: 0.75rem;
}

/* OPTION 4: Skill Bars/Progress Indicators */
.expertise-grid.option-4 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

.expertise-grid.option-4 .expertise-item {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.expertise-grid.option-4 .expertise-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.expertise-grid.option-4 .expertise-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
}

.expertise-grid.option-4 .expertise-level {
  font-size: 0.85rem;
  color: var(--accent-2);
  font-weight: 600;
}

.expertise-grid.option-4 .expertise-bar {
  height: 6px;
  background: rgba(88, 110, 156, 0.2);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.expertise-grid.option-4 .expertise-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, rgba(236, 72, 153, 0.8), rgba(56, 189, 248, 0.8));
  border-radius: 999px;
  transition: width 0.6s ease;
}

.expertise-grid.option-4 .expertise-description {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* OPTION 5: Minimal List with Visual Separators */
.expertise-grid.option-5 {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.expertise-grid.option-5 .expertise-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid rgba(88, 110, 156, 0.15);
}

.expertise-grid.option-5 .expertise-item:last-child {
  border-bottom: none;
}

.expertise-grid.option-5 .expertise-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  flex: 1;
}

.expertise-grid.option-5 .expertise-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  margin-top: 0.2rem;
}

.expertise-grid.option-5 .expertise-content {
  flex: 1;
}

.expertise-grid.option-5 .expertise-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.expertise-grid.option-5 .expertise-description {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* OPTION 6: Grid with Icon Emphasis */
.expertise-grid.option-6 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

.expertise-grid.option-6 .expertise-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.5rem;
  position: relative;
  cursor: pointer;
}

.expertise-grid.option-6 .expertise-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.expertise-grid.option-6 .expertise-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  filter: drop-shadow(0 4px 12px rgba(236, 72, 153, 0.3));
  transition: transform var(--transition), filter var(--transition);
}

.expertise-grid.option-6 .expertise-item:hover .expertise-icon {
  transform: scale(1.1);
  filter: drop-shadow(0 8px 20px rgba(236, 72, 153, 0.5));
}

.expertise-grid.option-6 .expertise-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.expertise-grid.option-6 .expertise-description {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
  opacity: 0.8;
  max-width: 200px;
}

/* OPTION 7: Accordion/Expandable */
.expertise-grid.option-7 {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.expertise-grid.option-7 .expertise-item {
  border: 1px solid rgba(88, 110, 156, 0.2);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color var(--transition);
}

.expertise-grid.option-7 .expertise-item:hover {
  border-color: rgba(236, 72, 153, 0.4);
}

.expertise-grid.option-7 .expertise-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  cursor: pointer;
  user-select: none;
}

.expertise-grid.option-7 .expertise-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.expertise-grid.option-7 .expertise-title {
  font-size: 1.1rem;
  font-weight: 600;
  flex: 1;
  margin: 0;
}

.expertise-grid.option-7 .expertise-toggle {
  font-size: 1.2rem;
  color: var(--text-muted);
  transition: transform var(--transition);
}

.expertise-grid.option-7 .expertise-item.active .expertise-toggle {
  transform: rotate(180deg);
}

.expertise-grid.option-7 .expertise-description {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  padding: 0 1.25rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.expertise-grid.option-7 .expertise-item.active .expertise-description {
  max-height: 200px;
  padding: 0 1.25rem 1rem;
}

/* OPTION 8: Visual Categories with Grouping */
.expertise-grid.option-8 {
  display: grid;
  /* 3 categories per row on large screens */
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

.expertise-grid.option-8 .expertise-category {
  padding: 1.5rem;
  background: rgba(12, 16, 38, 0.3);
  border: 1px solid rgba(88, 110, 156, 0.2);
  border-radius: var(--radius);
}

.expertise-grid.option-8 .expertise-category-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-2);
  margin-bottom: 1rem;
  font-weight: 600;
}

.expertise-grid.option-8 .expertise-items {
  /* Use a 3-column grid for cards inside each category, same as mixed option */
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

.expertise-grid.option-8 .expertise-item {
  display: flex;
  gap: 0.75rem;
}

.expertise-grid.option-8 .expertise-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.expertise-grid.option-8 .expertise-content {
  flex: 1;
}

.expertise-grid.option-8 .expertise-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.expertise-grid.option-8 .expertise-description {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Responsive adjustments for all options */
@media (max-width: 900px) {
  .expertise-grid.option-1,
  .expertise-grid.option-3,
  .expertise-grid.option-4,
  .expertise-grid.option-6 {
    grid-template-columns: repeat(2, 1fr);
  }

  /* On medium screens, show 2 categories per row */
  .expertise-grid.option-8 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .expertise-grid.option-1,
  .expertise-grid.option-3,
  .expertise-grid.option-4,
  .expertise-grid.option-6,
  .expertise-grid.option-8 {
    /* Stack to a single column on small screens */
    grid-template-columns: 1fr;
  }
}

/* EMPTY STATE */

.empty-state {
  text-align: center;
  padding: clamp(3rem, 8vw, 5rem) 0;
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* RESPONSIVE ADJUSTMENTS */

@media (max-width: 820px) {
  .publications-list {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .blog-meta,
  .publication-meta,
  .blog-post-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .blog-post-content h2 {
    font-size: 1.75rem;
    margin-top: 2rem;
  }

  .blog-post-content h3 {
    font-size: 1.25rem;
    margin-top: 1.5rem;
  }

  .about-sections {
    gap: clamp(2rem, 5vw, 3rem);
  }

  .work-timeline {
    gap: 1.5rem;
  }
}

@media (max-width: 640px) {
  .contact-cta,
  .about-cta {
    flex-direction: column;
  }

  .contact-cta .btn,
  .about-cta .btn {
    width: 100%;
  }

  .social-links-inline {
    flex-direction: column;
  }

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

  .blog-post-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
  }

  .blog-post-content {
    font-size: 1rem;
  }

  .blog-post-content h2 {
    font-size: 1.5rem;
    margin-top: 1.5rem;
  }

  .blog-post-content h3 {
    font-size: 1.15rem;
    margin-top: 1.25rem;
  }

  .blog-post-content img {
    margin: 1.5rem 0;
  }

  .about-lead {
    font-size: 1.1rem;
    margin-bottom: 1rem;
  }

  .about-section h2 {
    font-size: 1.5rem;
  }

  .contact-methods {
    gap: 1.5rem;
    margin-bottom: 1.5rem;
  }

  .contact-method h2 {
    font-size: 1.25rem;
  }

  .empty-state {
    padding: 2rem 0;
    font-size: 1rem;
  }
}

/* MIXED OPTION 1+8: Category blocks, badge tags, 3-column grid in each group */
.expertise-grid.option-1.option-8-mix {
  display: flex;
  flex-direction: column;
  gap: clamp(2rem, 4vw, 3rem);
}
/* Core expertise on About page: category cards with 3-column inner grid */
.expertise-grid.option-1.option-8-mix .expertise-category {
  margin-bottom: 0;
  padding: clamp(1.5rem, 4vw, 2rem);
  border-radius: var(--radius);
  background: rgba(12, 16, 38, 0.7);
  border: 1px solid rgba(88, 110, 156, 0.35);
  box-shadow: var(--shadow-md);
}

.expertise-grid.option-1.option-8-mix .expertise-category-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-2);
  margin-bottom: 1.25rem;
  font-weight: 600;
}

.expertise-items {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: stretch;
}

@media (max-width: 1100px) {
  .expertise-items {
    grid-template-columns: repeat(2, minmax(0,1fr));
  }
}

@media (max-width: 720px) {
  .expertise-items {
    grid-template-columns: 1fr;
  }
}
.expertise-item {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.expertise-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.expertise-icon {
  font-size: 1.75rem;
  flex-shrink: 0;
}
.expertise-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
}
.expertise-description {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.expertise-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.expertise-tag {
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  background: rgba(236, 72, 153, 0.15);
  color: var(--accent-4);
  border-radius: 999px;
  border: 1px solid rgba(236, 72, 153, 0.3);
}

/* ========================================
   RESPONSIVE DESIGN - COMPREHENSIVE BREAKPOINTS
   ======================================== */

/* Extra Large Screens (1400px+) */
@media (min-width: 1400px) {
  .container {
    max-width: 1320px;
  }
  
  .hero-title {
    font-size: clamp(3rem, 6.5vw, 4.2rem);
  }
}

/* Large Screens (1200px - 1399px) */
@media (max-width: 1399px) {
  .container {
    max-width: 1140px;
  }
}

/* Medium-Large Screens (1080px - 1199px) */
@media (max-width: 1199px) {
  .container {
    max-width: 960px;
  }
  
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 4rem;
  }
  
  .hero-lab__caption {
    max-width: none;
  }
  
  .panel-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
  }
}

/* Medium Screens (900px - 1079px) */
@media (max-width: 1079px) {
  .container {
    max-width: 840px;
  }
  
  .about-section--what-i-do .about-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  
  .about-intro {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .about-whatido-grid {
    grid-template-columns: 1fr;
  }
  
  .expertise-grid.option-1,
  .expertise-grid.option-3,
  .expertise-grid.option-4 {
    grid-template-columns: 1fr;
  }
}

/* Small-Medium Screens (768px - 899px) */
@media (max-width: 899px) {
  .container {
    max-width: 720px;
    padding: 0 1.5rem;
  }
  
  .hero-grid {
    gap: 3rem;
  }
  
  .nav-menu {
    gap: 1.2rem;
    font-size: 0.85rem;
  }
  
  .hero-intro {
    gap: 1.5rem;
  }
  
  .hero-lab__shell::after {
    inset: 18%;
  }
  
  .lab-orb--one,
  .lab-orb--two,
  .lab-orb--three {
    position: static;
    transform: none;
    margin-top: 1.2rem;
  }
  
  .lab-orb {
    max-width: none;
  }
  
  .hero-lab__shell {
    display: grid;
    gap: 1.2rem;
  }
  
  .hero-lab__shell::after {
    display: none;
  }
  
  .contact-content {
    gap: 2.5rem;
  }
  
  .blog-meta,
  .publication-meta,
  .blog-post-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

/* Tablet Screens (600px - 767px) */
@media (max-width: 767px) {
  .container {
    max-width: 540px;
    padding: 0 1rem;
  }
  
  .about-preview {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
  }
  
  .blog-list {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .contact-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .form-group.inline {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
  }
  
  .form-group.inline .form-label {
    min-width: auto;
    margin-bottom: 0.5rem;
  }
  
  .contact-form-section,
  .contact-method {
    padding: 2rem;
  }
  
  .form-input,
  .form-select,
  .form-textarea {
    min-width: 100%;
  }
  
  .form-select {
    min-width: 100%;
    padding-right: 2.5rem;
  }
  
  .category-section {
    margin-bottom: 2rem;
  }
  
  .category-title {
    font-size: 1.3rem;
    margin-bottom: 1rem;
  }
}

/* Large Mobile Screens (480px - 599px) */
@media (max-width: 599px) {
  .container {
    max-width: 100%;
    padding: 0 1rem;
  }
  
  .project-gallery {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .project-card {
    padding: 1.5rem;
  }
  
  .project-title {
    font-size: 1.2rem;
  }
  
  .expertise-grid.option-1,
  .expertise-grid.option-3,
  .expertise-grid.option-4 {
    gap: 1rem;
  }
}

/* Mobile Screens (400px - 479px) */
@media (max-width: 479px) {
  .container {
    padding: 0 0.75rem;
  }
  
  .hero {
    padding: clamp(2rem, 6vw, 3rem) 0 clamp(1.5rem, 4vw, 2rem);
  }
  
  .hero-lab__shell {
    padding: 1.5rem;
  }
  
  .project-card {
    padding: 1.2rem;
  }
  
  .contact-form-section,
  .contact-method {
    padding: 1rem;
  }
  
  .btn {
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
  }
  
  .hero-title {
    font-size: clamp(2rem, 5vw, 2.8rem);
  }
  
  .hero-subtitle {
    font-size: clamp(0.95rem, 1.8vw, 1.1rem);
  }
  
  .hero-grid {
    gap: 2rem;
  }
  
  .nav-shell {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .nav-menu {
    width: 100%;
    flex-direction: column;
    gap: 0.9rem;
  }
  
  .hero-actions,
  .hero-credentials {
    flex-direction: column;
    align-items: stretch;
  }
  
  .btn {
    width: 100%;
  }
  
  .contact-content {
    gap: 1.5rem;
  }
  
  .form-input,
  .form-select,
  .form-textarea {
    min-width: 100%;
    font-size: 0.85rem;
  }
  
  .form-select {
    min-width: 100%;
    padding-right: 2.5rem;
  }
  
  .persona-tabs {
    flex-direction: column;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 0.8rem;
    text-align: center;
  }
}

/* Small Mobile Screens (320px - 399px) */
@media (max-width: 399px) {
  .container {
    padding: 0 1.5rem;
  }
  
  .nav-shell {
    padding: 0.75rem 0.5rem;
  }

  .nav-brand a {
    font-size: 0.9rem;
  }

  .nav-glow {
    width: 7px;
    height: 7px;
  }

  .search-container-nav svg {
    width: 14px;
    height: 14px;
  }
  
  .nav-menu {
    width: 85%;
    max-width: 280px;
    padding: 3.5rem 1rem 1.5rem;
    gap: 0.8rem;
  }
  
  .nav-link {
    padding: 0.6rem 0.8rem;
    font-size: 0.85rem;
  }
  
  .hero-title {
    font-size: clamp(1.8rem, 4.5vw, 2.5rem);
  }
  
  .hero-subtitle {
    font-size: 0.9rem;
  }
  
  .btn {
    padding: 0.7rem 1.2rem;
    font-size: 0.9rem;
  }

  /* Fix expertise grid for iPhone 16 Pro (393px) */
  .expertise-grid.option-1,
  .expertise-grid.option-3,
  .expertise-grid.option-4,
  .expertise-grid.option-6 {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .expertise-item {
    padding: 1rem;
  }

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

  .expertise-description {
    font-size: 0.85rem;
  }

  /* Search overlay fixes for very small screens */
  .search-overlay {
    padding-top: 2vh;
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .search-container {
    width: 100%;
    max-width: none;
    margin: 0;
    border-radius: var(--radius);
  }
  
  .search-input-wrapper {
    padding: 12px;
  }
  
  .search-input-wrapper input {
    font-size: 16px; /* Prevents zoom on iOS */
    padding: 8px;
  }
  
  .search-results {
    max-height: 60vh;
    overflow-y: auto;
  }
  
  .search-result-item {
    padding: 12px;
  }
  
  .search-result-title {
    font-size: 0.9rem;
  }
  
  .search-result-excerpt {
    font-size: 0.8rem;
  }

  .project-card {
    padding: 1rem;
  }
  
  .contact-form-section,
  .contact-method {
    padding: 0.75rem;
  }
  
  .form-input,
  .form-select,
  .form-textarea {
    font-size: 0.8rem;
  }
  
  .category-title {
    font-size: 1.2rem;
  }
}

/* Ultra Small Screens (290px - 319px) */
@media (max-width: 319px) {
  /* Prevent horizontal scroll */
  body {
    overflow-x: hidden;
  }
  
  .container {
    padding: 0 0.25rem;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
  }
  
  .footer-content,
  .footer-bottom {
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    padding-left: 0.25rem;
    padding-right: 0.25rem;
  }
  
  /* Mobile navigation fixes for ultra-small screens */
  .nav-menu {
    width: 90%;
    max-width: 260px;
    padding: 3rem 0.8rem 1rem;
    gap: 0.6rem;
  }
  
  .nav-link {
    padding: 0.5rem 0.6rem;
    font-size: 0.8rem;
  }
  
  .search-overlay {
    padding-top: 1vh;
    padding-left: 0.25rem;
    padding-right: 0.25rem;
    align-items: flex-start;
    justify-content: flex-start;
  }
  
  .search-container {
    width: 37%;
    max-width: 37%;
    margin: 0;
    border-radius: var(--radius-sm);
    position: relative;
    left: 0;
    top: 0;
    box-sizing: border-box;
  }
  
  .search-input-wrapper {
    padding: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
  }
  
  .search-input-wrapper input {
    font-size: 12px;
    padding: 4px;
    width: 100%;
    box-sizing: border-box;
  }
  
  .search-input-wrapper svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    stroke: var(--text);
  }
  
  .search-results {
    max-height: 50vh;
    overflow-y: auto;
  }
  
  .search-result-item {
    padding: 6px;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  
  .search-result-title {
    font-size: 0.75rem;
    line-height: 1.2;
  }
  
  .search-result-excerpt {
    font-size: 0.7rem;
    line-height: 1.2;
  }
  
  .search-result-url {
    font-size: 0.65rem;
    word-break: break-all;
  }
  
  /* General font size reductions */
  h1, .hero-title {
    font-size: 1.2rem;
  }
  
  h2, .section-title {
    font-size: 1rem;
  }
  
  h3 {
    font-size: 0.9rem;
  }
  
  p, body {
    font-size: 0.8rem;
  }
  
  .btn {
    font-size: 0.75rem;
    padding: 0.5rem 0.8rem;
  }
}

/* Landscape orientations for mobile devices */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    padding: 2rem 0;
  }
  
  .hero-grid {
    gap: 2rem;
  }
  
  .hero-lab__shell {
    padding: 1.5rem;
  }
}

/* High DPI displays optimization */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .hero-lab__shell::after {
    border-width: 0.5px;
  }
  
  .blog-card-image img,
  .project-card img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Prevent image downloads */
img {
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  -webkit-touch-callout: none;
}

/* Dark mode support for system preference */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --accent: #38bdf8;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .hero-lab__shell::after {
    animation: none;
  }
  
  .lab-orb {
    animation: none;
  }
}

/* Print styles */
@media print {
  .hero-lab,
  .nav-menu,
  .footer-cta,
  .btn,
  .contact-form {
    display: none !important;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.4;
    color: #000;
    background: #fff;
  }
  
  .container {
    max-width: none;
    padding: 0;
  }
  
  .section {
    margin: 0 0 2rem 0;
  }
}

/* Navigation Grouping Styles */
.nav-menu li:nth-child(1) {
  margin-right: 0rem;
}

.nav-menu li:nth-child(2) {
  margin-right: 1rem;
}

.nav-menu li:nth-child(3),
.nav-menu li:nth-child(4) {
  margin-right: 0rem;
}

.nav-menu li:nth-child(5) {
  margin-right: 1rem;
}

.nav-menu li:nth-child(6) {
  margin-left: 0;
}

@media (max-width: 768px) {
  .nav-menu {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .nav-menu li {
    margin: 0 !important;
  }
}

/* Context Whisper Styles */
.context-whisper {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1rem;
  margin: 1.5rem 0;
  backdrop-filter: blur(10px);
}

.context-whisper-content {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.context-category,
.context-badge,
.context-date,
.context-reading-time {
  display: flex;
  align-items: center;
}

.context-value {
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
}

.context-excerpt {
  width: 100%;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.context-excerpt p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  line-height: 1.4;
  margin: 0;
}

/* Similar Blogs Styles */
.similar-blogs {
  margin: 3rem 0;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.similar-blogs-title {
  color: #fff;
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.similar-blogs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

/* Single post should not span full width */
.similar-blogs-grid .similar-blog-card:only-child {
  grid-column: 1 / span 1;
  max-width: 400px;
  justify-self: start;
}

.similar-blog-card {
  background: rgba(15, 23, 42, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.similar-blog-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.similar-blog-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.similar-blog-image {
  width: 100%;
  height: 160px;
  overflow: hidden;
}

.similar-blog-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.similar-blog-card:hover .similar-blog-image img {
  transform: scale(1.05);
}

.similar-blog-content {
  padding: 1.5rem;
}

.similar-blog-title {
  color: #fff;
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.similar-blog-excerpt {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.similar-blog-meta {
  display: flex;
  gap: 1rem;
  align-items: center;
  font-size: 0.8rem;
}

.similar-blog-date,
.similar-blog-reading-time {
  color: rgba(255, 255, 255, 0.5);
}

@media (max-width: 768px) {
  .context-whisper-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .similar-blogs-grid {
    grid-template-columns: 1fr;
  }
}

