/* Swiper Customization */
.swiper-button-next,
.swiper-button-prev {
  color: #22c55e !important;
}
.swiper-button-next::after,
.swiper-button-prev::after {
  font-family: system-ui, sans-serif !important;
  font-size: 1.5rem !important;
  font-weight: bold;
}
.swiper-button-next::after {
  content: "\203A" !important;
}
.swiper-button-prev::after {
  content: "\2039" !important;
}
@media (max-width: 768px) {
  .swiper-button-next,
  .swiper-button-prev {
    display: none !important;
  }
}
.swiper-slide {
  display: flex;
  flex-direction: column;
  height: auto; /* Ensure height is auto to avoid collapse */
}
.project-item {
  width: 100%;
  text-align: left;
  background: none;
  border: 1px solid transparent;
  padding: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Tailwind CSS Reset & Base Styles */
*,
::before,
::after {
  box-sizing: border-box;
  border-width: 0;
  border-style: solid;
  border-color: #e5e7eb;
}
::before,
::after {
  --tw-content: "";
}
html {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  -moz-tab-size: 4;
  tab-size: 4;
  font-family:
    "Inter",
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    sans-serif;
  font-feature-settings: normal;
  font-variation-settings: normal;
}
body {
  margin: 0;
  line-height: inherit;
  font-family: "Inter", sans-serif;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: inherit;
  font-weight: inherit;
}
a {
  color: inherit;
  text-decoration: inherit;
}
button,
input,
optgroup,
select,
textarea {
  font-family: inherit;
  font-feature-settings: inherit;
  font-variation-settings: inherit;
  font-size: 100%;
  font-weight: inherit;
  line-height: inherit;
  color: inherit;
  margin: 0;
  padding: 0;
}
button,
select {
  text-transform: none;
}
button,
[type="button"],
[type="reset"],
[type="submit"] {
  -webkit-appearance: button;
  background-color: transparent;
  background-image: none;
}
svg {
  display: block;
  vertical-align: middle;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #0a0a0a;
}
::-webkit-scrollbar-thumb {
  background: #262626;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #39ff14;
}

/* Animations */
@keyframes signal-pulse {
  0%,
  100% {
    transform: scaleY(0.1);
    opacity: 0.3;
  }
  50% {
    transform: scaleY(1);
    opacity: 1;
    box-shadow: 0 0 10px #39ff14;
  }
}
@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}
@keyframes pulse {
  50% {
    opacity: 0.5;
  }
}

.scanline {
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0) 50%,
    rgba(0, 0, 0, 0.2) 50%,
    rgba(0, 0, 0, 0.2)
  );
  background-size: 100% 4px;
  pointer-events: none;
}
.animate-marquee {
  animation: marquee 20s linear infinite;
  gap: 0;
}
.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
.signal-bar {
  animation: signal-pulse ease-in-out infinite;
  transform-origin: bottom;
  height: 100%;
}

/* Signal Border Microinteraction (project cards) */
@keyframes signal-border-pulse {
  0%,
  100% {
    opacity: 0.4;
  }
  50% {
    opacity: 1;
  }
}
.project-item::after {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  border: 2px solid rgb(34 197 94);
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.project-item:hover::after {
  opacity: 0.5;
}
.project-item[aria-current="true"]::after {
  opacity: 1;
  animation: signal-border-pulse 2s ease-in-out infinite;
}

/* Font Classes */
.font-mono {
  font-family: "JetBrains Mono", monospace;
}
.font-sans {
  font-family: "Inter", sans-serif;
}
.font-bold {
  font-weight: 700;
}

/* Utility Classes */
.hidden {
  display: none;
}
.block {
  display: block;
}
.inline-flex {
  display: inline-flex;
}
.flex {
  display: flex;
}
.grid {
  display: grid;
}
.fixed {
  position: fixed;
}
.absolute {
  position: absolute;
}
.relative {
  position: relative;
}
.inset-0 {
  inset: 0px;
}
.bottom-0 {
  bottom: 0px;
}
.left-0 {
  left: 0px;
}
.right-0 {
  right: 0px;
}
.top-0 {
  top: 0px;
}
.top-20 {
  top: 5rem;
}
.z-0 {
  z-index: 0;
}
.z-10 {
  z-index: 10;
}
.z-40 {
  z-index: 40;
}
.z-50 {
  z-index: 50;
}

/* Spacing */
.mx-auto {
  margin-left: auto;
  margin-right: auto;
}
.mx-8 {
  margin-left: 2rem;
  margin-right: 2rem;
}
.mb-1 {
  margin-bottom: 0.25rem;
}
.mb-2 {
  margin-bottom: 0.5rem;
}
.mb-3 {
  margin-bottom: 0.75rem;
}
.mb-4 {
  margin-bottom: 1rem;
}
.mb-6 {
  margin-bottom: 1.5rem;
}
.mb-10 {
  margin-bottom: 2.5rem;
}
.mb-12 {
  margin-bottom: 3rem;
}
.mb-16 {
  margin-bottom: 4rem;
}
.mt-1 {
  margin-top: 0.25rem;
}
.mt-6 {
  margin-top: 1.5rem;
}
.mr-2 {
  margin-right: 0.5rem;
}
.ml-1 {
  margin-left: 0.25rem;
}

.p-2 {
  padding: 0.5rem;
}
.p-3 {
  padding: 0.75rem;
}
.p-4 {
  padding: 1rem;
}
.p-5 {
  padding: 1.25rem;
}
.p-8 {
  padding: 2rem;
}
.px-2 {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}
.px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}
.px-6 {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}
.px-8 {
  padding-left: 2rem;
  padding-right: 2rem;
}
.py-1 {
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}
.py-3 {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}
.py-4 {
  padding-top: 1rem;
  padding-bottom: 1rem;
}
.py-8 {
  padding-top: 2rem;
  padding-bottom: 2rem;
}
.py-24 {
  padding-top: 6rem;
  padding-bottom: 6rem;
}
.pb-8 {
  padding-bottom: 2rem;
}
.pt-20 {
  padding-top: 5rem;
}

/* Sizing */
.h-6 {
  height: 1.5rem;
}
.min-h-12 {
  min-height: 3rem;
}
.h-8 {
  height: 2rem;
}
.h-12 {
  height: 3rem;
}
.w-12 {
  width: 3rem;
}
.h-20 {
  height: 5rem;
}
.h-32 {
  height: 8rem;
}
.h-screen {
  height: 100vh;
}
.min-h-screen {
  min-height: 100vh;
}
.w-2 {
  width: 0.5rem;
}
.w-6 {
  width: 1.5rem;
}
.w-8 {
  width: 2rem;
}
.w-10 {
  width: 2.5rem;
}
.w-full {
  width: 100%;
}
.max-w-md {
  max-width: 28rem;
}
.max-w-xl {
  max-width: 36rem;
}
.max-w-2xl {
  max-width: 42rem;
}
.max-w-3xl {
  max-width: 48rem;
}
.max-w-7xl {
  max-width: 80rem;
}
.min-w-0 {
  min-width: 0;
}
.min-w-\[44px\] {
  min-width: 44px;
}
.min-h-\[44px\] {
  min-height: 44px;
}
.h-10 {
  height: 2.5rem;
}
.w-fit {
  width: fit-content;
}

/* Flexbox & Grid */
.flex-col {
  flex-direction: column;
}
.flex-wrap {
  flex-wrap: wrap;
}
.items-start {
  align-items: flex-start;
}
.items-end {
  align-items: flex-end;
}
.items-center {
  align-items: center;
}
.justify-start {
  justify-content: flex-start;
}
.justify-end {
  justify-content: flex-end;
}
.justify-center {
  justify-content: center;
}
.justify-between {
  justify-content: space-between;
}
.gap-4 {
  gap: 1rem;
}
.gap-6 {
  gap: 1.5rem;
}
.gap-8 {
  gap: 2rem;
}
.space-x-1 > :not([hidden]) ~ :not([hidden]) {
  margin-left: 0.25rem;
}
.space-x-2 > :not([hidden]) ~ :not([hidden]) {
  margin-left: 0.5rem;
}
.space-x-4 > :not([hidden]) ~ :not([hidden]) {
  margin-left: 1rem;
}
.space-x-6 > :not([hidden]) ~ :not([hidden]) {
  margin-left: 1.5rem;
}
.space-y-2 > :not([hidden]) ~ :not([hidden]) {
  margin-top: 0.5rem;
}
.space-y-4 > :not([hidden]) ~ :not([hidden]) {
  margin-top: 1rem;
}
.grid-cols-1 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}
.grid-cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Typography */
.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;
}
.text-4xl {
  font-size: 2.25rem;
  line-height: 2.5rem;
}
.text-5xl {
  font-size: 3rem;
  line-height: 1;
}
.uppercase {
  text-transform: uppercase;
}
.tracking-wide {
  letter-spacing: 0.025em;
}
.tracking-wider {
  letter-spacing: 0.05em;
}
.tracking-widest {
  letter-spacing: 0.1em;
}
.tracking-tighter {
  letter-spacing: -0.05em;
}
.leading-relaxed {
  line-height: 1.625;
}
.text-center {
  text-align: center;
}
.text-right {
  text-align: right;
}
.whitespace-nowrap {
  white-space: nowrap;
}

/* Colors */
.bg-transparent {
  background-color: transparent;
}
.bg-white {
  background-color: rgb(255 255 255);
}
.bg-black {
  background-color: rgb(0 0 0);
}
.bg-neutral-50 {
  background-color: rgb(250 250 250);
}
.bg-neutral-200 {
  background-color: rgb(229 229 229);
}
.bg-neutral-600 {
  background-color: rgb(82 82 82);
}
.bg-neutral-700 {
  background-color: rgb(64 64 64);
}
.bg-neutral-800 {
  background-color: rgb(38 38 38);
}
.bg-neutral-900 {
  background-color: rgb(23 23 23);
}
.bg-neutral-950 {
  background-color: rgb(10 10 10);
}
.bg-green-500 {
  background-color: rgb(34 197 94);
}
.bg-green-500\/10 {
  background-color: rgb(34 197 94 / 0.1);
}
.bg-amber-500\/10 {
  background-color: rgb(245 158 11 / 0.1);
}
.bg-neutral-900\/50 {
  background-color: rgb(23 23 23 / 0.5);
}
.bg-neutral-950\/90 {
  background-color: rgb(10 10 10 / 0.9);
}

.text-white {
  color: rgb(255 255 255);
}
.text-black {
  color: rgb(0 0 0);
}
.text-neutral-200 {
  color: rgb(229 229 229);
}
.text-neutral-300 {
  color: rgb(212 212 212);
}
.text-green-500 {
  color: rgb(34 197 94);
}
.text-green-900 {
  color: rgb(66 129 91);
}
.text-green-400 {
  color: rgb(74 222 128);
}
.text-blue-500 {
  color: rgb(59 130 246);
}
.text-amber-500 {
  color: rgb(245 158 11);
}
.text-purple-500 {
  color: rgb(168 85 247);
}
.text-red-500 {
  color: rgb(239 68 68);
}
.text-cyan-500 {
  color: rgb(6 182 212);
}

/* Borders */
.border {
  border-width: 1px;
}
.border-b {
  border-bottom-width: 1px;
}
.border-b-2 {
  border-bottom-width: 2px;
}
.border-t {
  border-top-width: 1px;
}
.border-y {
  border-top-width: 1px;
  border-bottom-width: 1px;
}
.border-transparent {
  border-color: transparent;
}
.border-white {
  border-color: rgb(255 255 255);
}
.border-neutral-600 {
  border-color: rgb(82 82 82);
}
.border-neutral-700 {
  border-color: rgb(64 64 64);
}
.border-neutral-800 {
  border-color: rgb(38 38 38);
}
.border-neutral-900 {
  border-color: rgb(23 23 23);
}
.border-green-500 {
  border-color: rgb(34 197 94);
}
.border-green-500\/20 {
  border-color: rgb(34 197 94 / 0.2);
}
.border-green-500\/50 {
  border-color: rgb(34 197 94 / 0.5);
}
.border-amber-500\/20 {
  border-color: rgb(245 158 11 / 0.2);
}

/* Border Radius */
.rounded {
  border-radius: 0.25rem;
}
.rounded-sm {
  border-radius: 0.125rem;
}
.rounded-lg {
  border-radius: 0.5rem;
}
.rounded-full {
  border-radius: 9999px;
}
.rounded-t-sm {
  border-top-left-radius: 0.125rem;
  border-top-right-radius: 0.125rem;
}

/* Effects */
.opacity-10 {
  opacity: 0.1;
}
.opacity-20 {
  opacity: 0.2;
}
.opacity-50 {
  opacity: 0.5;
}
.backdrop-blur {
  backdrop-filter: blur(8px);
}
.overflow-hidden {
  overflow: hidden;
}
.overflow-x-hidden {
  overflow-x: hidden;
}
.pointer-events-none {
  pointer-events: none;
}
.hide-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.hide-scrollbar::-webkit-scrollbar {
  display: none;
}

/* Terminal Layout - all !important to guarantee overlay is on top */
#terminal-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  z-index: 99999 !important;
  height: 100% !important;
  width: 100% !important;
  background-color: rgb(10 10 10) !important;
}
#terminal-overlay.flex {
  display: flex !important;
  flex-direction: column !important;
}
#terminal-overlay > :first-child {
  flex-shrink: 0 !important;
}
#terminal-output {
  flex: 1 1 0% !important;
  min-height: 0 !important;
  overflow-y: auto !important;
}
#terminal-overlay > :last-child {
  flex-shrink: 0 !important;
}
#terminal-input {
  flex: 1 1 0% !important;
}

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

/* Hover States */
.hover\:bg-green-400:hover {
  background-color: rgb(74 222 128);
}
.hover\:bg-green-500:hover {
  background-color: rgb(34 197 94);
}
.hover\:bg-neutral-200:hover {
  background-color: rgb(229 229 229);
}
.hover\:bg-neutral-800:hover {
  background-color: rgb(38 38 38);
}
.hover\:text-black:hover {
  color: rgb(0 0 0);
}
.hover\:text-white:hover {
  color: rgb(255 255 255);
}
.hover\:text-green-400:hover {
  color: rgb(74 222 128);
}
.hover\:text-green-500:hover {
  color: rgb(34 197 94);
}
.hover\:border-white:hover {
  border-color: rgb(255 255 255);
}
.hover\:border-neutral-600:hover {
  border-color: rgb(82 82 82);
}
.hover\:border-green-500:hover {
  border-color: rgb(34 197 94);
}
.hover\:border-green-500\/50:hover {
  border-color: rgb(34 197 94 / 0.5);
}

.group:hover .group-hover\:text-green-400 {
  color: rgb(74 222 128);
}
.group:hover .group-hover\:text-green-500 {
  color: rgb(34 197 94);
}
.group:hover .group-hover\:text-neutral-300 {
  color: rgb(212 212 212);
}
.group:hover .group-hover\:opacity-20 {
  opacity: 0.2;
}

/* Responsive - MD (768px+) */
@media (min-width: 768px) {
  .md\:flex {
    display: flex;
  }
  .md\:hidden {
    display: none;
  }
  .md\:block {
    display: block;
  }
  .md\:h-64 {
    height: 16rem;
  }
  .md\:w-4 {
    width: 1rem;
  }
  .md\:w-auto {
    width: auto;
  }
  .md\:max-w-auto {
    max-width: none;
  }
  .md\:flex-row {
    flex-direction: row;
  }
  .md\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .md\:grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .md\:space-x-4 > :not([hidden]) ~ :not([hidden]) {
    margin-left: 1rem;
  }
  .md\:space-x-6 > :not([hidden]) ~ :not([hidden]) {
    margin-left: 1.5rem;
  }
  .md\:space-y-0 > :not([hidden]) ~ :not([hidden]) {
    margin-top: 0;
  }
  .md\:text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
  }
  .md\:text-5xl {
    font-size: 3rem;
    line-height: 1;
  }
  .md\:text-7xl {
    font-size: 4.5rem;
    line-height: 1;
  }
  .md\:py-16 {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }
  .md\:min-h-0 {
    min-height: 0;
  }
  .md\:h-auto {
    height: auto;
  }
}

/* Responsive - LG (1024px+) */
@media (min-width: 1024px) {
  .lg\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .lg\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .lg\:text-9xl {
    font-size: 8rem;
    line-height: 1;
  }
  .lg\:text-lg {
    font-size: 1.125rem;
    line-height: 1.75rem;
  }
  .lg\:py-20 {
    padding-top: 5rem;
    padding-bottom: 5rem;
  }
  .lg\:mb-12 {
    margin-bottom: 3rem;
  }
}

/* Accessibility: Screen Reader Only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.focus\:not-sr-only:focus {
  position: fixed;
  width: auto;
  height: auto;
  padding: 0;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
}
.focus\:fixed:focus {
  position: fixed;
}
.focus\:top-4:focus {
  top: 1rem;
}
.focus\:left-4:focus {
  left: 1rem;
}
.focus\:z-50:focus {
  z-index: 50;
}
.focus\:px-4:focus {
  padding-left: 1rem;
  padding-right: 1rem;
}
.focus\:py-2:focus {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}
.focus\:bg-green-500:focus {
  background-color: rgb(34 197 94);
}
.focus\:text-black:focus {
  color: rgb(0 0 0);
}
.focus\:font-mono:focus {
  font-family: "JetBrains Mono", monospace;
}
.focus\:font-bold:focus {
  font-weight: 700;
}
.focus\:rounded:focus {
  border-radius: 0.25rem;
}

/* Accessibility: Focus Visible Outlines */
:focus-visible {
  outline: 2px solid #22c55e;
  outline-offset: 2px;
}

/* Accessibility: Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  .animate-marquee,
  .animate-pulse,
  .animate-ping,
  .signal-bar {
    animation: none !important;
  }
  .project-item[aria-current="true"]::after {
    animation: none !important;
    opacity: 1;
  }
  html {
    scroll-behavior: auto !important;
  }
  .scanline {
    display: none;
  }
  .transition-all,
  .transition-colors,
  .transition-opacity {
    transition: none !important;
  }
}

/* Honeypot field - must stay hidden */
#bot_check {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  position: absolute !important;
  pointer-events: none !important;
}

/* Contact Form Input Fixes - Ensures dark background and white text */
#contact-form input:not(#bot_check),
#contact-form textarea {
  display: block !important;
  width: 100% !important;
  background-color: rgb(23 23 23) !important;
  color: rgb(255 255 255) !important;
  box-sizing: border-box !important;
}

/* Fix for browser autofill background/text colors */
#contact-form input:not(#bot_check):-webkit-autofill,
#contact-form input:not(#bot_check):-webkit-autofill:hover,
#contact-form input:not(#bot_check):-webkit-autofill:focus,
#contact-form textarea:-webkit-autofill,
#contact-form textarea:-webkit-autofill:hover,
#contact-form textarea:-webkit-autofill:focus {
  -webkit-text-fill-color: rgb(255 255 255) !important;
  -webkit-box-shadow: 0 0 0px 1000px rgb(23 23 23) inset !important;
  transition: background-color 5000s ease-in-out 0s;
  caret-color: white;
}

/* Restore focus effect for contact form inputs */
#contact-form input:not(#bot_check):focus,
#contact-form textarea:focus {
  border-color: rgb(34 197 94) !important;
  outline: none !important;
}
