/* ============================================
   CSS VARIABLES & RESET
   ============================================ */
:root {
  --bg-primary: #09090b;
  --bg-secondary: #111114;
  --bg-card: #16161a;
  --bg-card-hover: #1c1c21;
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(0, 229, 255, 0.3);
  --text-primary: #f4f4f5;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --accent: #00E5FF;
  --accent-deep: #00B8D4;
  --accent-bright: #18FFFF;
  --accent-glow: rgba(0, 229, 255, 0.15);
  --accent-glow-soft: rgba(0, 229, 255, 0.08);
  --accent-glow-strong: rgba(0, 229, 255, 0.3);
  --font-body: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

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

button, input {
  font-family: inherit;
  border: none;
  outline: none;
  background: none;
}

/* ============================================
   ANIMATED BACKGROUND
   ============================================ */
.bg-mesh {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.bg-mesh::before {
  content: '';
  position: absolute;
  width: 120vw;
  height: 120vh;
  top: -20%;
  left: -10%;
  background:
    radial-gradient(ellipse 600px 600px at 20% 30%, rgba(0, 229, 255, 0.07) 0%, transparent 70%),
    radial-gradient(ellipse 500px 500px at 80% 20%, rgba(0, 229, 255, 0.05) 0%, transparent 70%),
    radial-gradient(ellipse 800px 400px at 50% 80%, rgba(0, 229, 255, 0.04) 0%, transparent 70%);
  animation: meshDrift 20s ease-in-out infinite alternate;
}

.bg-mesh::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  background-size: 256px 256px;
  opacity: 0.5;
}

@keyframes meshDrift {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-2%, 3%) scale(1.02); }
  100% { transform: translate(2%, -2%) scale(1); }
}

/* Grid overlay */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 20%, transparent 70%);
}

/* ============================================
   LAYOUT
   ============================================ */
.page-wrapper {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================
   HEADER
   ============================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 24px;
  transition: background 0.4s ease, backdrop-filter 0.4s ease;
}

.header.scrolled {
  background: rgba(9, 9, 11, 0.8);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  position: relative;
}

.logo-wordmark {
  font-family: 'Michroma', sans-serif;
  font-weight: 400;
  font-size: 3.1rem;
  color: var(--text-primary);
  letter-spacing: 0.04em;
  position: relative;
  display: inline-block;
  line-height: 1;
  -webkit-text-stroke: 2px var(--text-primary);
  paint-order: stroke fill;
}

/* i-outer wraps both the clipped letter and the unclipped dot */
.logo-wordmark .i-outer {
  position: relative;
  display: inline-block;
}

/* The letter "i" — clip its top to hide the native tittle */
.logo-wordmark .i-outer .i-letter {
  display: inline-block;
  clip-path: inset(32% 0 0 0);
}

/* Glowing dot — lives outside the clip, positioned over the i */
.logo-wordmark .i-outer .i-dot {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  left: 50%;
  transform: translateX(-50%);
  box-shadow:
    0 0 6px 2px rgba(0, 229, 255, 0.6),
    0 0 16px 4px rgba(0, 229, 255, 0.35),
    0 0 30px 6px rgba(0, 229, 255, 0.15);
  z-index: 2;
  top: 12%;
}

/* Light streak below each dot */
.logo-wordmark .i-outer .i-streak {
  position: absolute;
  width: 4px;
  height: 10px;
  top: 22%;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(to bottom, rgba(0, 229, 255, 0.25), transparent);
  border-radius: 2px;
  z-index: 1;
}

.header-contact {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: -0.01em;
  padding: 8px 16px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  transition: all 0.3s var(--ease-out-expo);
}

.header-contact:hover {
  color: var(--text-secondary);
  border-color: var(--border-hover);
  background: var(--accent-glow);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  margin-top: auto;
  padding: 48px 24px;
  border-top: 1px solid var(--border-subtle);
}

.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-legal {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.6;
  font-family: var(--font-mono);
  letter-spacing: -0.01em;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-size: 0.78rem;
  color: var(--text-muted);
  transition: color 0.3s ease;
  font-family: var(--font-mono);
  letter-spacing: -0.01em;
}

.footer-links a:hover {
  color: var(--text-secondary);
}

.footer-links a::after {
  content: '';
  display: block;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s var(--ease-out-expo);
}

.footer-links a:hover::after {
  width: 100%;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .logo-wordmark {
    font-size: 2rem;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .header-inner {
    height: 60px;
  }

  .logo-wordmark {
    font-size: 1.25rem;
  }

  .logo-wordmark .i-outer .i-dot {
    width: 4px;
    height: 4px;
  }
}
