:root {
  --accent: #F05A28;
  --accent-hover: #FF6C3D;
  --accent-glow: rgba(240, 90, 40, 0.25);
  --bg-dark: #060608;
  --surface-graphite: #121216;
  --surface-graphite-hover: #181820;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text-primary: #FFFFFF;
  --text-secondary: rgba(255, 255, 255, 0.65);
  --text-muted: #8A8A93;
  --font-display: 'Manrope', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

*, ::after, ::before {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: 0 solid #e5e7eb;
}

a, button, input, select, textarea {
  text-decoration: none !important;
}

a {
  color: inherit;
  text-decoration: none !important;
}

a:hover, a:focus, a:active, a:visited {
  text-decoration: none !important;
}

html {
  background: var(--bg-dark);
  scroll-padding-top: 90px;
  color-scheme: dark;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  font-family: var(--font-body);
}

body {
  background: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Core Layout Utilities */
.hidden { display: none !important; }
.block { display: block !important; }
.inline-block { display: inline-block !important; }
.flex { display: flex !important; }
.inline-flex { display: inline-flex !important; }
.grid { display: grid !important; }

.flex-col { flex-direction: column !important; }
.flex-row { flex-direction: row !important; }
.flex-wrap { flex-wrap: wrap !important; }
.flex-1 { flex: 1 1 0% !important; }
.shrink-0 { flex-shrink: 0 !important; }

.items-start { align-items: flex-start !important; }
.items-center { align-items: center !important; }
.items-end { align-items: flex-end !important; }
.justify-start { justify-content: flex-start !important; }
.justify-center { justify-content: center !important; }
.justify-between { justify-content: space-between !important; }
.justify-end { justify-content: flex-end !important; }

.gap-1 { gap: 0.25rem !important; }
.gap-1\.5 { gap: 0.375rem !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-2\.5 { gap: 0.625rem !important; }
.gap-3 { gap: 0.75rem !important; }
.gap-3\.5 { gap: 0.875rem !important; }
.gap-4 { gap: 1rem !important; }
.gap-6 { gap: 1.5rem !important; }
.gap-8 { gap: 2rem !important; }
.gap-10 { gap: 2.5rem !important; }
.gap-12 { gap: 3rem !important; }

.space-y-2 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.5rem !important; }
.space-y-3 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.75rem !important; }
.space-y-4 > :not([hidden]) ~ :not([hidden]) { margin-top: 1rem !important; }
.space-y-5 > :not([hidden]) ~ :not([hidden]) { margin-top: 1.25rem !important; }

.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)) !important; }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }

.relative { position: relative !important; }
.absolute { position: absolute !important; }
.fixed { position: fixed !important; }
.inset-0 { inset: 0 !important; }
.top-0 { top: 0 !important; }
.left-0 { left: 0 !important; }
.right-0 { right: 0 !important; }
.bottom-0 { bottom: 0 !important; }
.left-1\/2 { left: 50% !important; }
.-translate-x-1\/2 { transform: translateX(-50%) !important; }
.z-10 { z-index: 10 !important; }
.z-50 { z-index: 50 !important; }

.w-full { width: 100% !important; }
.w-auto { width: auto !important; }
.w-2 { width: 0.5rem !important; }
.w-3 { width: 0.75rem !important; }
.w-8 { width: 2rem !important; }
.w-12 { width: 3rem !important; }
.h-12 { height: 3rem !important; }
.h-full { height: 100% !important; }
.h-auto { height: auto !important; }
.h-1\.5 { height: 0.375rem !important; }
.h-2 { height: 0.5rem !important; }
.h-3 { height: 0.75rem !important; }
.h-8 { height: 2rem !important; }
.h-9 { height: 2.25rem !important; }
.h-28 { height: 7rem !important; }
.min-h-\[320px\] { min-height: 320px !important; }

.max-w-xs { max-width: 20rem !important; }
.max-w-sm { max-width: 24rem !important; }
.max-w-md { max-width: 28rem !important; }
.max-w-xl { max-width: 36rem !important; }
.max-w-2xl { max-width: 42rem !important; }
.max-w-3xl { max-width: 48rem !important; }
.max-w-4xl { max-width: 56rem !important; }
.max-w-5xl { max-width: 64rem !important; }
.max-w-6xl { max-width: 72rem !important; }
.max-h-\[260px\] { max-height: 260px !important; }
.max-h-\[420px\] { max-height: 420px !important; }
.object-contain { object-fit: contain !important; }
.object-cover { object-fit: cover !important; }
.mx-auto { margin-left: auto !important; margin-right: auto !important; }

.p-2 { padding: 0.5rem !important; }
.p-3 { padding: 0.75rem !important; }
.p-3\.5 { padding: 0.875rem !important; }
.p-4 { padding: 1rem !important; }
.p-5 { padding: 1.25rem !important; }
.p-6 { padding: 1.5rem !important; }
.p-8 { padding: 2rem !important; }
.p-12 { padding: 3rem !important; }

.px-2\.5 { padding-left: 0.625rem !important; padding-right: 0.625rem !important; }
.px-3 { padding-left: 0.75rem !important; padding-right: 0.75rem !important; }
.px-4 { padding-left: 1rem !important; padding-right: 1rem !important; }
.px-5 { padding-left: 1.25rem !important; padding-right: 1.25rem !important; }
.px-6 { padding-left: 1.5rem !important; padding-right: 1.5rem !important; }
.px-8 { padding-left: 2rem !important; padding-right: 2rem !important; }

.py-0\.5 { padding-top: 0.125rem !important; padding-bottom: 0.125rem !important; }
.py-1 { padding-top: 0.25rem !important; padding-bottom: 0.25rem !important; }
.py-1\.5 { padding-top: 0.375rem !important; padding-bottom: 0.375rem !important; }
.py-2 { padding-top: 0.5rem !important; padding-bottom: 0.5rem !important; }
.py-3 { padding-top: 0.75rem !important; padding-bottom: 0.75rem !important; }
.py-3\.5 { padding-top: 0.875rem !important; padding-bottom: 0.875rem !important; }
.py-4 { padding-top: 1rem !important; padding-bottom: 1rem !important; }
.py-5 { padding-top: 1.25rem !important; padding-bottom: 1.25rem !important; }
.py-6 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }
.py-8 { padding-top: 2rem !important; padding-bottom: 2rem !important; }
.py-12 { padding-top: 3rem !important; padding-bottom: 3rem !important; }
.py-20 { padding-top: 5rem !important; padding-bottom: 5rem !important; }
.py-24 { padding-top: 6rem !important; padding-bottom: 6rem !important; }
.py-28 { padding-top: 7rem !important; padding-bottom: 7rem !important; }
.py-32 { padding-top: 8rem !important; padding-bottom: 8rem !important; }

.pt-2 { padding-top: 0.5rem !important; }
.pt-4 { padding-top: 1rem !important; }
.pt-6 { padding-top: 1.5rem !important; }
.pt-8 { padding-top: 2rem !important; }
.pt-36 { padding-top: 9rem !important; }
.pb-6 { padding-bottom: 1.5rem !important; }
.pb-8 { padding-bottom: 2rem !important; }
.pb-12 { padding-bottom: 3rem !important; }
.pb-20 { padding-bottom: 5rem !important; }

.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 0.75rem !important; }
.mb-4 { margin-bottom: 1rem !important; }
.mb-6 { margin-bottom: 1.5rem !important; }
.mb-8 { margin-bottom: 2rem !important; }
.mb-10 { margin-bottom: 2.5rem !important; }
.mb-12 { margin-bottom: 3rem !important; }
.mb-16 { margin-bottom: 4rem !important; }
.mb-20 { margin-bottom: 5rem !important; }

.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 0.75rem !important; }
.mt-6 { margin-top: 1.5rem !important; }
.mt-10 { margin-top: 2.5rem !important; }
.mt-14 { margin-top: 3.5rem !important; }
.ml-2 { margin-left: 0.5rem !important; }
.ml-3 { margin-left: 0.75rem !important; }

.text-center { text-align: center !important; }
.text-left { text-align: left !important; }

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

.font-light { font-weight: 300 !important; }
.font-normal { font-weight: 400 !important; }
.font-medium { font-weight: 500 !important; }
.font-semibold { font-weight: 600 !important; }
.font-bold { font-weight: 700 !important; }
.font-extrabold { font-weight: 800 !important; }

.uppercase { text-transform: uppercase !important; }
.tracking-wider { letter-spacing: 0.05em !important; }
.tracking-widest { letter-spacing: 0.1em !important; }
.tracking-tight { letter-spacing: -0.025em !important; }
.leading-none { line-height: 1 !important; }
.leading-tight { line-height: 1.25 !important; }
.leading-relaxed { line-height: 1.625 !important; }

.text-white { color: #FFFFFF !important; }
.text-gray-200 { color: #E5E7EB !important; }
.text-gray-300 { color: #D1D5DB !important; }
.text-gray-400 { color: #9CA3AF !important; }
.text-gray-500 { color: #6B7280 !important; }
.text-gray-600 { color: #4B5563 !important; }
.text-accent { color: var(--accent) !important; }
.text-emerald-400 { color: #34D399 !important; }
.text-red-400 { color: #F87171 !important; }
.text-amber-400 { color: #FBBF24 !important; }
.text-blue-400 { color: #60A5FA !important; }
.text-black { color: #000000 !important; }

.bg-accent { background-color: var(--accent) !important; }
.bg-accent\/10 { background-color: rgba(240, 90, 40, 0.1) !important; }
.bg-accent\/20 { background-color: rgba(240, 90, 40, 0.2) !important; }
.bg-white\/5 { background-color: rgba(255, 255, 255, 0.05) !important; }
.bg-white\/10 { background-color: rgba(255, 255, 255, 0.1) !important; }
.bg-white\/\[0\.03\] { background-color: rgba(255, 255, 255, 0.03) !important; }
.bg-black { background-color: #000000 !important; }

.border { border-width: 1px !important; }
.border-t { border-top-width: 1px !important; }
.border-b { border-bottom-width: 1px !important; }
.border-y { border-top-width: 1px !important; border-bottom-width: 1px !important; }
.border-white\/5 { border-color: rgba(255, 255, 255, 0.05) !important; }
.border-white\/10 { border-color: rgba(255, 255, 255, 0.1) !important; }
.border-white\/15 { border-color: rgba(255, 255, 255, 0.15) !important; }
.border-accent\/30 { border-color: rgba(240, 90, 40, 0.3) !important; }

.rounded { border-radius: 0.25rem !important; }
.rounded-md { border-radius: 0.375rem !important; }
.rounded-lg { border-radius: 0.5rem !important; }
.rounded-xl { border-radius: 0.75rem !important; }
.rounded-2xl { border-radius: 1rem !important; }
.rounded-full { border-radius: 9999px !important; }

.overflow-hidden { overflow: hidden !important; }
.pointer-events-none { pointer-events: none !important; }
.transition-colors { transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease !important; }
.transition-all { transition: all 0.25s ease !important; }

@media (min-width: 640px) {
  .sm\:block { display: block !important; }
  .sm\:flex { display: flex !important; }
  .sm\:flex-row { flex-direction: row !important; }
  .sm\:w-auto { width: auto !important; }
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .sm\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
  .sm\:text-4xl { font-size: 2.25rem !important; }
  .sm\:text-5xl { font-size: 3rem !important; line-height: 1 !important; }
}

@media (min-width: 768px) {
  .md\:flex { display: flex !important; }
  .md\:hidden { display: none !important; }
  .md\:inline-flex { display: inline-flex !important; }
  .md\:flex-row { flex-direction: row !important; }
  .md\:items-end { align-items: flex-end !important; }
  .md\:justify-end { justify-content: flex-end !important; }
  .md\:pt-44 { padding-top: 11rem !important; }
  .md\:p-12 { padding: 3rem !important; }
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
  .md\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
  .md\:grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)) !important; }
  .md\:col-span-1 { grid-column: span 1 / span 1 !important; }
  .md\:col-span-2 { grid-column: span 2 / span 2 !important; }
  .md\:col-span-3 { grid-column: span 3 / span 3 !important; }
  .md\:col-span-4 { grid-column: span 4 / span 4 !important; }
  .md\:col-span-6 { grid-column: span 6 / span 6 !important; }
  .md\:col-span-7 { grid-column: span 7 / span 7 !important; }
  .md\:text-base { font-size: 1rem !important; }
  .md\:text-lg { font-size: 1.125rem !important; }
  .md\:text-xl { font-size: 1.25rem !important; }
  .md\:text-2xl { font-size: 1.5rem !important; }
  .md\:text-3xl { font-size: 1.875rem !important; }
  .md\:text-4xl { font-size: 2.25rem !important; }
  .md\:text-5xl { font-size: 3rem !important; }
  .md\:text-6xl { font-size: 3.75rem !important; }
  .md\:mt-14 { margin-top: 3.5rem !important; }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
  .lg\:grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)) !important; }
  .lg\:col-span-4 { grid-column: span 4 / span 4 !important; }
  .lg\:col-span-5 { grid-column: span 5 / span 5 !important; }
  .lg\:col-span-7 { grid-column: span 7 / span 7 !important; }
  .lg\:col-span-8 { grid-column: span 8 / span 8 !important; }
  .lg\:text-7xl { font-size: 4.5rem !important; line-height: 1 !important; }
}

/* Selection & Scrollbar */
::selection {
  background: var(--accent);
  color: #000;
}

::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

h1, h2, h3, h4, .font-display {
  font-family: var(--font-display);
  letter-spacing: -0.025em;
  color: var(--text-primary);
}
.font-mono {
  font-family: var(--font-mono);
}

.glass-card {
  position: relative;
  background: var(--surface-graphite);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.glass-card:hover {
  border-color: rgba(240, 90, 40, 0.35);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.7), 0 0 30px -10px var(--accent-glow);
}
.project-card.is-hidden {
  display: none !important;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-weight: 600;
  font-size: 0.925rem;
  padding: 0.85rem 1.8rem;
  border-radius: 999px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  text-decoration: none;
  border: none;
  position: relative;
  overflow: hidden;
}
.btn-primary {
  background: var(--accent);
  color: #060608;
  box-shadow: 0 4px 20px -4px var(--accent-glow);
}
.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px -6px rgba(240, 90, 40, 0.5);
}
.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

#navbar {
  transition: all 0.35s ease;
  border-bottom: 1px solid transparent;
}
#navbar.scrolled {
  background: rgba(6, 6, 8, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom-color: var(--border-subtle);
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.nav-link {
  position: relative;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.25s ease;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
}
.nav-link:hover::after, .nav-link.active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.modal.active {
  display: flex;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 6, 8, 0.88);
  backdrop-filter: blur(12px);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.modal.active .modal-backdrop {
  opacity: 1;
}
.modal-content {
  position: relative;
  background: var(--surface-graphite);
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  padding: 2.25rem;
  max-width: 520px;
  width: 100%;
  transform: scale(0.95) translateY(15px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.8), 0 0 40px -10px var(--accent-glow);
  z-index: 10;
}
.modal.active .modal-content {
  transform: scale(1) translateY(0);
  opacity: 1;
}
.modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.modal-close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: var(--font-body);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.07);
}
.form-group select option {
  background: #121216;
  color: #fff;
}
