@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg: #08090B;
  --surface: #101114;
  --surface-hover: #16171B;
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.15);
  --text-primary: #F4F4F5;
  --text-secondary: #A1A1AA;
  --text-muted: #71717A;
  --accent-blue: #3B82F6;
  --accent-green: #22C55E;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  background-color: var(--bg);
  color: var(--text-primary);
  line-height: 1.5;
  overflow-x: hidden;
  position: relative;
}

::selection {
  background: rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
}

.font-mono {
  font-family: 'JetBrains Mono', monospace;
}

/* ============================================================
   TACTILE & MODERN BACKGROUND ARCHITECTURE (LINEAR / VERCEL CRAFT)
   ============================================================ */

/* Top Edge Hairline Gleam */
.site-top-gleam {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 1.5px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(56, 189, 248, 0.4) 20%,
    rgba(255, 255, 255, 0.9) 50%,
    rgba(99, 102, 241, 0.4) 80%,
    transparent 100%
  );
  z-index: 99;
  pointer-events: none;
}

/* Fixed Full-Screen Modern Background Canvas */
.site-bg-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-color: #08090C;
}

/* Atmospheric Top Horizon Glow (Subtle Dark Slate/Cyan Light Cone) */
.site-ambient-light {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 1280px;
  height: 700px;
  background: radial-gradient(
    ellipse 80% 550px at 50% -50px,
    rgba(56, 189, 248, 0.12) 0%,
    rgba(99, 102, 241, 0.06) 40%,
    transparent 75%
  );
  pointer-events: none;
}

/* Precision Engineering Dot Matrix & CAD Cross Grid */
.site-grid-pattern {
  position: absolute;
  inset: 0;
  background-image: 
    /* 1. Visible, clean dot matrix */
    radial-gradient(rgba(255, 255, 255, 0.15) 1.25px, transparent 1.25px),
    /* 2. Major 128px blueprint grid lines */
    linear-gradient(to right, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 32px 32px, 128px 128px, 128px 128px;
  background-position: 0 0, 0 0, 0 0;
  mask-image: radial-gradient(ellipse 95% 85% at 50% 20%, black 50%, rgba(0, 0, 0, 0.6) 85%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 95% 85% at 50% 20%, black 50%, rgba(0, 0, 0, 0.6) 85%, transparent 100%);
  pointer-events: none;
}

/* Tactile Micro-Noise Texture (Anodized matte metal finish) */
.site-noise-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 90;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Container */
.site-container {
  max-width: 1080px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

@media (min-width: 768px) {
  .site-container {
    padding-left: 48px;
    padding-right: 48px;
  }
}

/* Navigation Links */
.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 500;
  color: #A1A1AA;
  text-decoration: none;
  transition: all 0.15s ease;
}

.nav-link:hover {
  color: #F4F4F5;
  background-color: rgba(255, 255, 255, 0.06);
}

/* Nav CTA Button (Balanced & Proportional) */
.nav-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #FFFFFF;
  color: #08090C;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 9999px;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transition: all 0.15s ease;
  white-space: nowrap;
}

.nav-cta-btn:hover {
  background: #E4E4E7;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.15);
}

/* Cards & Surfaces (Crafted with subtle top highlight) */
.card-clean {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.005) 100%), #101114;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.4), inset 0 1px 0 0 rgba(255, 255, 255, 0.06);
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.card-clean:hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%), #141519;
  border-color: var(--border-strong);
  box-shadow: 0 12px 32px -4px rgba(0, 0, 0, 0.6), inset 0 1px 0 0 rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #F4F4F5;
  color: #08090B;
  font-weight: 500;
  font-size: 14px;
  padding: 10px 22px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary:hover {
  opacity: 0.95;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.15);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
  font-weight: 500;
  font-size: 14px;
  padding: 10px 22px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

/* Minimalist Phone Mockup Frame */
.phone-clean-frame {
  position: relative;
  width: 290px;
  height: 580px;
  background: #090A0D;
  border-radius: 42px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 
    0 0 0 3px rgba(255, 255, 255, 0.025),
    0 25px 60px -15px rgba(0, 0, 0, 0.85),
    inset 0 1px 1px 0 rgba(255, 255, 255, 0.25);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

@media (min-width: 640px) {
  .phone-clean-frame {
    width: 310px;
    height: 620px;
  }
}

.phone-dynamic-island {
  position: absolute;
  top: 11px;
  left: 50%;
  transform: translateX(-50%);
  width: 76px;
  height: 18px;
  background: #000000;
  border-radius: 12px;
  z-index: 20;
  border: 1px solid rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.phone-screen-viewport {
  flex: 1;
  background: #000000;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.phone-screen-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}

/* Lightbox & Dialog Modals */
.lightbox-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.15s ease-out;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  cursor: pointer;
}

.modal-content-dialog {
  position: relative;
  z-index: 10;
  max-width: 640px;
  width: 100%;
  max-height: 85vh;
  background: #111215;
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: scaleIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.97) translateY(6px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.lightbox-content {
  position: relative;
  z-index: 10;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  background: #101114;
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Clean Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #08090B;
}
::-webkit-scrollbar-thumb {
  background: #27272A;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #3F3F46;
}
