/* ========== SYNTOR DESIGN SYSTEM ========== */

html {
  overflow-x: hidden;
}

/* --- Animations --- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
@keyframes typewriter {
  from { width: 0; }
  to { width: 100%; }
}
@keyframes blink {
  0%, 100% { border-color: #CD101E; }
  50% { border-color: transparent; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes grid-move {
  0% { transform: translate(0, 0); }
  100% { transform: translate(28px, 28px); }
}

.animate-fade-up {
  animation: fadeUp 0.6s ease-out both;
}
.animate-fade-in {
  animation: fadeIn 0.5s ease-out both;
}
.animate-slide-left {
  animation: slideInLeft 0.6s ease-out both;
}
.animate-float {
  animation: float 3s ease-in-out infinite;
}

.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }
.delay-500 { animation-delay: 500ms; }

/* --- Scroll reveal --- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Tech grid background --- */
.tech-grid {
  position: relative;
  overflow: hidden;
}
.tech-grid::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(205, 16, 30, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(205, 16, 30, 0.06) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}
[data-theme="dark"] .tech-grid::before {
  background-image:
    linear-gradient(rgba(205, 16, 30, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(205, 16, 30, 0.08) 1px, transparent 1px);
}

/* --- Dot grid background --- */
.dot-grid {
  position: relative;
  overflow: hidden;
}
.dot-grid::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(205, 16, 30, 0.08) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

/* --- Navbar --- */
.nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 50;
}
.nav-dropdown.active {
  display: block;
}

/* --- Mobile menu --- */
.mobile-menu {
  display: none;
}
.mobile-menu.active {
  display: flex;
  max-height: min(70vh, calc(100dvh - 4.5rem));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: max(1rem, env(safe-area-inset-bottom));
}

/* --- Terminal mockup --- */
.terminal-window {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.8rem;
  line-height: 1.6;
}
.terminal-line::before {
  content: "$ ";
  color: #CD101E;
  font-weight: 600;
}
.terminal-output {
  color: #71717A;
}
[data-theme="dark"] .terminal-output {
  color: #A1A1AA;
}

/* --- Counter animation --- */
.counter {
  font-variant-numeric: tabular-nums;
}

/* --- Smooth scroll --- */
html {
  scroll-behavior: smooth;
}

/* --- Card hover --- */
.card-hover {
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.card-hover:hover {
  border-color: #CD101E;
  transform: translateY(-2px);
}

/* --- Lucide icon sizing --- */
[data-lucide] {
  width: 20px;
  height: 20px;
}
.icon-sm [data-lucide],
[data-lucide].icon-sm {
  width: 16px;
  height: 16px;
}
.icon-lg [data-lucide],
[data-lucide].icon-lg {
  width: 24px;
  height: 24px;
}
.icon-xl [data-lucide],
[data-lucide].icon-xl {
  width: 32px;
  height: 32px;
}

/* --- Brand assets --- */
.brand-logo {
  display: block;
  height: 28px;
  max-width: 140px;
  object-fit: contain;
}

@media (min-width: 640px) {
  .brand-logo {
    height: 32px;
    max-width: 160px;
  }
}

.brand-logo-light {
  display: none;
}

[data-theme="dark"] .brand-logo-dark {
  display: none;
}

[data-theme="dark"] .brand-logo-light {
  display: block;
}

.brand-logo-light:first-child,
.brand-logo-dark:last-child {
  display: block;
}

/* --- Active nav link --- */
.nav-active {
  color: #CD101E !important;
  font-weight: 600;
}

/* --- Focus ring override --- */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid #CD101E;
  outline-offset: 2px;
}

/* --- Selection --- */
::selection {
  background: rgba(205, 16, 30, 0.15);
  color: inherit;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #D4D4D4;
  border-radius: 3px;
}
[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: #3F3F46;
}
