/* =====================================================================
   utilities.css — self-hosted replacement for the Tailwind Play CDN.
   Implements exactly the utility classes used across the portfolio, plus
   the minimal preflight reset Tailwind used to inject. Same class names,
   so the HTML and the JS class-swapping logic keep working unchanged.
   ===================================================================== */

/* ---- Preflight reset (mirrors Tailwind's base layer) ---- */
*, *::before, *::after { box-sizing: border-box; border-width: 0; border-style: solid; border-color: currentColor; }
html { line-height: 1.5; -webkit-text-size-adjust: 100%; }
h1, h2, h3, h4, h5, h6 { font-size: inherit; font-weight: inherit; margin: 0; }
p, figure, figcaption { margin: 0; }
ul, ol { list-style: none; margin: 0; padding: 0; }
a { color: inherit; text-decoration: inherit; }
button { font-family: inherit; font-size: 100%; line-height: inherit; color: inherit; background: transparent; margin: 0; padding: 0; border: 0; cursor: pointer; }
img, canvas { display: block; }
img { max-width: 100%; }
strong { font-weight: bolder; }

/* ---- Position ---- */
.absolute { position: absolute; }
.relative { position: relative; }
.inset-0 { inset: 0; }
.top-0 { top: 0; }
.top-6 { top: 1.5rem; }
.top-10 { top: 2.5rem; }
.-top-6 { top: -1.5rem; }
.left-0 { left: 0; }
.left-6 { left: 1.5rem; }
.left-1\/2 { left: 50%; }
.bottom-6 { bottom: 1.5rem; }
.z-0 { z-index: 0; }
.z-30 { z-index: 30; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }

/* ---- Display / flex / grid ---- */
.block { display: block; }
.flex { display: flex; }
.grid { display: grid; }
.hidden { display: none; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-baseline { align-items: baseline; }
.justify-center { justify-content: center; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.gap-10 { gap: 2.5rem; }

/* ---- Spacing between children ---- */
.space-x-2 > * + * { margin-left: 0.5rem; }
.space-x-6 > * + * { margin-left: 1.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.space-y-8 > * + * { margin-top: 2rem; }
.space-y-10 > * + * { margin-top: 2.5rem; }

/* ---- Sizing ---- */
.w-full { width: 100%; }
.w-screen { width: 100vw; }
.w-max { width: max-content; }
.h-full { height: 100%; }
.h-screen { height: 100vh; }
.h-auto { height: auto; }
.w-8 { width: 2rem; }
.w-40 { width: 10rem; }
.w-48 { width: 12rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-6xl { max-width: 72rem; }
.max-h-\[80vh\] { max-height: 80vh; }
.max-h-\[85vh\] { max-height: 85vh; }
.aspect-\[3\/4\] { aspect-ratio: 3 / 4; }
.overflow-hidden { overflow: hidden; }
.overflow-y-auto { overflow-y: auto; }
.object-cover { object-fit: cover; }

/* ---- Margin / padding ---- */
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-10 { margin-bottom: 2.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-12 { margin-top: 3rem; }
.mx-4 { margin-left: 1rem; margin-right: 1rem; }
.p-2 { padding: 0.5rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.pb-4 { padding-bottom: 1rem; }
.pl-3 { padding-left: 0.75rem; }
.pl-4 { padding-left: 1rem; }

/* ---- Typography ---- */
.font-mono { font-family: 'JetBrains Mono', monospace; }
.font-serif { font-family: ui-serif, Georgia, serif; }
.font-light { font-weight: 300; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.italic { font-style: italic; }
.uppercase { text-transform: uppercase; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.leading-relaxed { line-height: 1.625; }
.tracking-tight { letter-spacing: -0.025em; }
.tracking-widest { letter-spacing: 0.1em; }
.tracking-\[0\.2em\] { letter-spacing: 0.2em; }
.tracking-\[0\.3em\] { letter-spacing: 0.3em; }
.whitespace-nowrap { white-space: nowrap; }

.text-\[9px\]  { font-size: 9px; }
.text-\[10px\] { font-size: 10px; }
.text-xs   { font-size: 0.75rem;  line-height: 1rem; }
.text-sm   { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem;     line-height: 1.5rem; }
.text-lg   { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl   { font-size: 1.25rem;  line-height: 1.75rem; }
.text-2xl  { font-size: 1.5rem;   line-height: 2rem; }
.text-3xl  { font-size: 1.875rem; line-height: 2.25rem; }

.line-clamp-4 { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

/* ---- Colors ---- */
.text-white { color: #fff; }
.text-\[\#00ff41\] { color: #00ff41; }
.text-\[\#333\] { color: #333; }
.text-\[\#444\] { color: #444; }
.text-\[\#555\] { color: #555; }
.text-\[\#666\] { color: #666; }
.text-\[\#888\] { color: #888; }
.text-\[\#ccc\] { color: #ccc; }

.bg-black\/80 { background-color: rgba(0, 0, 0, 0.8); }
.bg-black\/90 { background-color: rgba(0, 0, 0, 0.9); }
.backdrop-blur-md { -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }

/* ---- Borders ---- */
.border { border-width: 1px; }
.border-b { border-bottom-width: 1px; }
.border-l { border-left-width: 1px; }
.border-\[\#222\] { border-color: #222; }
.border-\[\#333\] { border-color: #333; }

/* ---- Effects / transforms ---- */
.grayscale { filter: grayscale(1); }
.-translate-x-1\/2 { transform: translateX(-50%); }
.translate-x-3 { transform: translateX(0.75rem); }

/* ---- Transitions ---- */
.transition-colors { transition-property: color, background-color, border-color, fill, stroke; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.transition-all { transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.duration-300 { transition-duration: 300ms; }
.duration-500 { transition-duration: 500ms; }

/* ---- Pointer events ---- */
.pointer-events-auto { pointer-events: auto; }
.pointer-events-none { pointer-events: none; }

/* ---- hover: / group-hover: variants ---- */
.hover\:text-\[\#00ff41\]:hover { color: #00ff41; }
.group:hover .group-hover\:text-white { color: #fff; }
.group:hover .group-hover\:text-\[\#00ff41\] { color: #00ff41; }
.group:hover .group-hover\:grayscale-0 { filter: grayscale(0); }
.group:hover .group-hover\:border-\[\#00ff41\] { border-color: #00ff41; }

/* ---- Responsive: sm (>=640px) ---- */
@media (min-width: 640px) {
  .sm\:text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
}

/* ---- Responsive: md (>=768px) ---- */
@media (min-width: 768px) {
  .md\:top-12 { top: 3rem; }
  .md\:left-12 { left: 3rem; }
  .md\:bottom-12 { bottom: 3rem; }
  .md\:bottom-8 { bottom: 2rem; }
  .md\:gap-16 { gap: 4rem; }
  .md\:gap-20 { gap: 5rem; }
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:space-x-8 > * + * { margin-left: 2rem; }
  .md\:space-y-10 > * + * { margin-top: 2.5rem; }
  .md\:space-y-12 > * + * { margin-top: 3rem; }
  .md\:mb-6 { margin-bottom: 1.5rem; }
  .md\:mb-8 { margin-bottom: 2rem; }
  .md\:mb-10 { margin-bottom: 2.5rem; }
  .md\:mb-12 { margin-bottom: 3rem; }
  .md\:mt-0 { margin-top: 0; }
  .md\:mx-10 { margin-left: 2.5rem; margin-right: 2.5rem; }
  .md\:p-12 { padding: 3rem; }
  .md\:px-0 { padding-left: 0; padding-right: 0; }
  .md\:px-10 { padding-left: 2.5rem; padding-right: 2.5rem; }
  .md\:w-10 { width: 2.5rem; }
  .md\:w-48 { width: 12rem; }
  .md\:w-64 { width: 16rem; }
  .md\:text-\[10px\] { font-size: 10px; }
  .md\:text-\[11px\] { font-size: 11px; }
  .md\:text-xs { font-size: 0.75rem; line-height: 1rem; }
  .md\:text-sm { font-size: 0.875rem; line-height: 1.25rem; }
  .md\:text-xl { font-size: 1.25rem; line-height: 1.75rem; }
  .md\:text-2xl { font-size: 1.5rem; line-height: 2rem; }
  .md\:text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
  .md\:text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
  .md\:text-5xl { font-size: 3rem; line-height: 1; }
}

/* ---- Responsive: lg (>=1024px) ---- */
@media (min-width: 1024px) {
  .lg\:w-96 { width: 24rem; }
}
