/* ============================================================
   FRISKY DEV — style.css
   Boutique IT Operations Studio · Awwwards Edition
   ============================================================ */

/* ---------- Custom Properties ---------- */
:root {
  /* Brand - Neon Nexus Theme */
  --color-bg:         #05060a;
  --color-surface:    #0a0b10;
  --color-card:       rgba(10, 11, 16, 0.55);
  --color-border:     rgba(255, 255, 255, 0.04);
  --color-border-2:   rgba(255, 255, 255, 0.08);
  --color-text:       #f5f6f9;
  --color-text-dim:   #949aab;
  --color-text-muted: #5c6275;
  
  /* Neon Accents */
  --color-cyan:       #00e5ff;
  --color-violet:     #7b2fff;
  --color-magenta:    #ff2d9b;
  --color-accent:     var(--color-cyan);
  --color-accent-20:  rgba(0, 229, 255, 0.2);
  --color-accent-08:  rgba(0, 229, 255, 0.08);
  --color-accent-04:  rgba(0, 229, 255, 0.04);
  
  /* Gradients */
  --grad-nexus:       linear-gradient(135deg, var(--color-cyan) 0%, var(--color-violet) 50%, var(--color-magenta) 100%);
  --grad-nexus-text:  linear-gradient(135deg, var(--color-cyan) 20%, var(--color-violet) 60%, var(--color-magenta) 100%);
  --grad-surface:     linear-gradient(180deg, rgba(10, 11, 16, 0.8) 0%, rgba(5, 6, 10, 0.95) 100%);

  /* Typography */
  --font-body: 'Outfit', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', monospace;

  /* Sizing */
  --container-max: 1200px;
  --nav-height:    72px;
  --section-pad:   clamp(100px, 15vw, 200px);
  --grid-gap:      clamp(20px, 2.5vw, 32px);

  /* Motion */
  --ease-out-expo:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-in-out:    cubic-bezier(0.65, 0, 0.35, 1);
  --duration-fast:  200ms;
  --duration-base:  300ms;
  --duration-slow:  800ms;

  /* Scrollbar */
  scrollbar-color: var(--color-cyan) var(--color-bg);
  scrollbar-width: thin;

  color-scheme: dark;
}

/* Legacy scrollbar fallback */
@supports not (scrollbar-color: auto) {
  ::-webkit-scrollbar { width: 8px; height: 8px; }
  ::-webkit-scrollbar-thumb { background: var(--color-accent); border-radius: 4px; }
  ::-webkit-scrollbar-track { background: var(--color-card); }
}


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

@supports selector(::target-text) {
  ::target-text {
    background: var(--color-accent);
    color: #080808;
  }
}


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

html {
  scroll-behavior: smooth;
  scroll-snap-type: y proximity;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(15px, 1.1vw, 17px);
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  overflow-x: hidden;
  cursor: none;
}

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

ul { list-style: none; }
img { display: block; max-width: 100%; }

button {
  font: inherit;
  cursor: none;
  border: none;
  background: none;
  color: inherit;
}


/* ---------- Utilities ---------- */
.section-label {
  font-family: var(--font-mono);
  font-size: clamp(11px, 0.85vw, 13px);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-accent);
  margin-block-end: clamp(40px, 5vw, 64px);
}

/* Section scroll snap */
section,
.marquee {
  scroll-snap-align: start;
}


/* ============================================================
   PAGE LOADER
   ============================================================ */
.loader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.loader__logo {
  font-family: var(--font-mono);
  font-size: clamp(40px, 8vw, 80px);
  font-weight: 700;
  color: var(--color-accent);
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.6s ease, transform 0.6s var(--ease-out-expo);
}

.loader__slash {
  color: var(--color-accent);
}

.loader--done .loader__logo {
  opacity: 0;
  transform: scale(3);
}

.loader--done {
  opacity: 0;
  transition: opacity 0.4s ease 0.3s;
}

.loader--hidden {
  display: none;
}


/* ============================================================
   SCROLL PROGRESS BAR
   ============================================================ */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: var(--color-accent);
  z-index: 9998;
  transition: none;
  will-change: width;
}


/* ============================================================
   GLOBAL NOISE OVERLAY
   ============================================================ */
.noise-overlay {
  position: fixed;
  inset: 0;
  z-index: 9997;
  pointer-events: none;
  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='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* ============================================================
   AURORA BACKGROUND BLOBS
   ============================================================ */
.bg-aurora {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
  opacity: 0.45;
  filter: blur(140px);
}

.aurora-blob {
  position: absolute;
  border-radius: 50%;
  mix-blend-mode: screen;
  will-change: transform;
}

.aurora-blob--1 {
  top: -15%;
  left: -10%;
  width: 55vw;
  height: 55vw;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.22) 0%, transparent 70%);
  animation: float-aurora-1 28s infinite alternate ease-in-out;
}

.aurora-blob--2 {
  bottom: -20%;
  right: -10%;
  width: 65vw;
  height: 65vw;
  background: radial-gradient(circle, rgba(123, 47, 255, 0.18) 0%, transparent 70%);
  animation: float-aurora-2 35s infinite alternate ease-in-out;
}

.aurora-blob--3 {
  top: 35%;
  left: 45%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(255, 45, 155, 0.12) 0%, transparent 70%);
  animation: float-aurora-3 24s infinite alternate ease-in-out;
}

@keyframes float-aurora-1 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(12vw, 15vh) scale(1.15); }
}

@keyframes float-aurora-2 {
  0% { transform: translate(0, 0) scale(1.1); }
  100% { transform: translate(-15vw, -12vh) scale(0.95); }
}

@keyframes float-aurora-3 {
  0% { transform: translate(0, 0) scale(0.9); }
  100% { transform: translate(8vw, -8vh) scale(1.1); }
}


/* ============================================================
   CURSOR + TRAIL
   ============================================================ */
.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 8px;
  height: 8px;
  background: var(--color-accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width var(--duration-base) var(--ease-out-expo),
              height var(--duration-base) var(--ease-out-expo),
              background var(--duration-base) var(--ease-out-expo),
              border var(--duration-base) var(--ease-out-expo);
  will-change: transform;
  mix-blend-mode: difference;
}

.cursor-dot--hover {
  width: 40px;
  height: 40px;
  background: transparent;
  border: 2px solid var(--color-accent);
}

.cursor-trail {
  position: fixed;
  top: 0;
  left: 0;
  width: 6px;
  height: 6px;
  background: var(--color-accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  will-change: transform;
  mix-blend-mode: difference;
}

.cursor-trail--1 { opacity: 0.4; width: 5px; height: 5px; }
.cursor-trail--2 { opacity: 0.25; width: 4px; height: 4px; }
.cursor-trail--3 { opacity: 0.12; width: 3px; height: 3px; }

/* Click ripple */
.click-ripple {
  position: fixed;
  width: 0;
  height: 0;
  border: 2px solid var(--color-accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  opacity: 0;
}

.click-ripple--active {
  animation: ripple-burst 0.6s var(--ease-out-expo) forwards;
}

@keyframes ripple-burst {
  0% {
    width: 0;
    height: 0;
    opacity: 0.8;
  }
  100% {
    width: 80px;
    height: 80px;
    opacity: 0;
  }
}

/* Hide custom cursor on touch devices */
@media (pointer: coarse) {
  .cursor-dot,
  .cursor-trail,
  .click-ripple {
    display: none;
  }
  body {
    cursor: auto;
  }
  a, button {
    cursor: pointer;
  }
}


/* ============================================================
   TOAST
   ============================================================ */
.toast {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  font-family: var(--font-mono);
  font-size: 13px;
  color: #080808;
  background: var(--color-accent);
  padding: 10px 24px;
  border-radius: 6px;
  z-index: 10001;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s var(--ease-out-expo);
}

.toast--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}


/* ============================================================
   1. NAV
   ============================================================ */
.nav {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 100;
  height: var(--nav-height);
  transition: background var(--duration-base) ease,
              backdrop-filter var(--duration-base) ease,
              -webkit-backdrop-filter var(--duration-base) ease,
              border-color var(--duration-base) ease;
  border-block-end: 1px solid transparent;
}

.nav--scrolled {
  background: rgba(8, 8, 8, 0.8);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  backdrop-filter: blur(20px) saturate(1.2);
  border-block-end-color: var(--color-border);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 48px);
  height: 100%;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: clamp(18px, 1.6vw, 22px);
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.02em;
  transition: opacity var(--duration-fast) ease;
}

.nav__logo-image {
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 0 8px rgba(0, 229, 255, 0.4));
  transition: transform 0.6s var(--ease-out-expo);
}

.nav__logo:hover { opacity: 0.9; }
.nav__logo:hover .nav__logo-image {
  transform: rotate(360deg) scale(1.1);
}

.nav__logo--spin .nav__logo-image {
  animation: logo-spin 0.8s var(--ease-out-expo) forwards;
}

@keyframes logo-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.nav__links {
  display: flex;
  gap: clamp(20px, 3vw, 40px);
}

.nav__link {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  color: var(--color-text-dim);
  letter-spacing: 0.02em;
  position: relative;
  padding-block-end: 2px;
  transition: color var(--duration-base) ease;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  inset-inline-start: 0;
  width: 0;
  height: 1px;
  background: var(--color-accent);
  transition: width var(--duration-base) var(--ease-out-expo);
}

.nav__link:hover { color: var(--color-text); }
.nav__link:hover::after { width: 100%; }


/* ============================================================
   2. HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-inline: clamp(20px, 6vw, 64px);
  overflow: hidden;
}

/* Massive Neon Nexus glow behind hero content */
.hero::before {
  content: '';
  position: absolute;
  top: 35%;
  left: 25%;
  width: 65vw;
  height: 45vh;
  background: radial-gradient(ellipse, rgba(0, 229, 255, 0.07) 0%, rgba(123, 47, 255, 0.03) 45%, transparent 75%);
  pointer-events: none;
  z-index: 0;
  filter: blur(80px);
  animation: hero-glow-pulse 8s ease-in-out infinite alternate;
}

@keyframes hero-glow-pulse {
  0%   { opacity: 0.6; transform: scale(1); }
  100% { opacity: 1; transform: scale(1.2); }
}

/* Dynamic dot grid with radial gradient and mouse glow mask */
.hero__grid-bg {
  position: absolute;
  inset: -60px;
  background-image:
    radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(0, 229, 255, 0.15) 0%, transparent 40%),
    radial-gradient(circle 1.2px at center, var(--color-border) 1px, transparent 1px),
    radial-gradient(circle 0.6px at 15px 15px, rgba(255, 255, 255, 0.02) 0.6px, transparent 0.6px);
  background-size:
    100% 100%,
    30px 30px,
    30px 30px;
  opacity: 0.6;
  transition: transform 0.15s ease-out;
  will-change: transform;
}

/* Horizontal scanline */
.hero__scanline {
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--color-cyan) 30%, var(--color-magenta) 70%, transparent 100%);
  opacity: 0.12;
  animation: scanline-move 10s linear infinite;
  z-index: 2;
  pointer-events: none;
}

@keyframes scanline-move {
  0% { top: 0; }
  100% { top: 100%; }
}

/* Geometric accent */
.hero__geometric {
  position: absolute;
  top: 15%;
  right: 12%;
  width: 140px;
  height: 140px;
  border: 1px solid rgba(0, 229, 255, 0.25);
  border-image: var(--grad-nexus) 1;
  opacity: 0.2;
  animation: geo-rotate 25s linear infinite, geo-pulse 4s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 1;
}

/* Second geometric accent — smaller, different position */
.hero__geometric-2 {
  position: absolute;
  bottom: 22%;
  left: 10%;
  width: 80px;
  height: 80px;
  border: 1px solid rgba(123, 47, 255, 0.2);
  border-radius: 50%;
  opacity: 0.12;
  animation: geo-rotate 18s linear infinite reverse, geo-pulse 5s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 1;
}

/* Horizontal accent line */
.hero__hline {
  position: absolute;
  top: 25%;
  left: 0;
  width: 250px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-cyan), transparent);
  opacity: 0.15;
  pointer-events: none;
  z-index: 1;
}

@keyframes geo-rotate {
  to { transform: rotate(360deg); }
}

@keyframes geo-pulse {
  0%   { opacity: 0.1; }
  100% { opacity: 0.25; }
}

.hero__content {
  position: relative;
  max-width: var(--container-max);
  width: 100%;
  z-index: 3;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: center;
}

.hero__content-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero__content-right {
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1000px;
}

.hero__hologram {
  position: relative;
  width: 100%;
  max-width: 360px;
  transform-style: preserve-3d;
  will-change: transform;
}

.hologram-svg-container {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 0 25px rgba(0, 229, 255, 0.35)) drop-shadow(0 0 50px rgba(123, 47, 255, 0.15));
  animation: hologram-float 6s ease-in-out infinite alternate;
  transform-style: preserve-3d;
  will-change: transform;
}

.hologram-svg-container svg {
  width: 100%;
  height: auto;
  display: block;
}

@keyframes hologram-float {
  0% {
    transform: translateY(-8px) rotateY(-4deg) rotateX(2deg);
  }
  100% {
    transform: translateY(8px) rotateY(4deg) rotateX(-2deg);
  }
}

.hero__headline {
  font-family: var(--font-body);
  font-size: clamp(48px, 10vw, 120px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.04em;
  color: var(--color-text);
  margin-block-end: clamp(20px, 3vw, 32px);
}

.hero__line {
  display: block;
}

.hero__line--accent {
  color: var(--color-accent);
}

/* Character stagger */
.char-stagger {
  display: inline-block;
  opacity: 0;
  transform: translateY(60px) rotateX(40deg);
  animation: char-drop var(--duration-slow) var(--ease-out-expo) forwards;
  transform-origin: center bottom;
}

@keyframes char-drop {
  to {
    opacity: 1;
    transform: translateY(0) rotateX(0deg);
  }
}

/* Glitch effect */
.glitch {
  position: relative;
  display: inline-block;
  animation: glitch-entry 0.5s ease 1.2s both;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  opacity: 0;
}

.glitch::before {
  color: #ff0040;
  clip-path: inset(0 0 60% 0);
}

.glitch::after {
  color: #00e5ff;
  clip-path: inset(40% 0 0 0);
}

.glitch--active::before,
.glitch--active::after {
  animation: glitch-jitter 0.3s linear;
}

@keyframes glitch-entry {
  0% {
    opacity: 0;
    transform: translateY(60px) rotateX(40deg);
  }
  100% {
    opacity: 1;
    transform: translateY(0) rotateX(0deg);
  }
}

@keyframes glitch-jitter {
  0%   { opacity: 0.8; transform: translate(0); }
  20%  { transform: translate(-3px, 2px); }
  40%  { transform: translate(3px, -1px); }
  60%  { transform: translate(-2px, -2px); }
  80%  { transform: translate(2px, 1px); }
  100% { opacity: 0; transform: translate(0); }
}

/* Typewriter sub */
.hero__sub {
  font-size: clamp(15px, 1.3vw, 19px);
  font-weight: 400;
  color: var(--color-text-dim);
  margin-block-end: clamp(28px, 4vw, 48px);
  opacity: 0;
  font-family: var(--font-mono);
  letter-spacing: 0.01em;
}

.hero__sub--typing {
  opacity: 1;
  border-inline-end: 2px solid var(--color-accent);
  animation: blink-caret 0.7s step-end infinite;
  width: fit-content;
}

.hero__sub--done {
  border-color: transparent;
  animation: none;
}

@keyframes blink-caret {
  0%, 100% { border-color: var(--color-accent); }
  50%      { border-color: transparent; }
}

.hero__cta {
  font-family: var(--font-body);
  font-size: clamp(14px, 1.1vw, 16px);
  font-weight: 500;
  color: var(--color-accent);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  animation: fade-in-up var(--duration-slow) var(--ease-out-expo) 3.5s forwards;
  transition: opacity var(--duration-base) ease;
}

.hero__cta:hover { opacity: 0.7; }

.hero__cta-arrow {
  display: inline-block;
  animation: bounce-arrow 2s ease-in-out infinite;
}

@keyframes bounce-arrow {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(6px); }
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* ============================================================
   3. STATS STRIP
   ============================================================ */
.stats {
  background: var(--color-surface);
  border-block: 1px solid transparent;
  border-image: linear-gradient(90deg, transparent 0%, var(--color-accent-20) 20%, var(--color-accent-20) 80%, transparent 100%) 1;
}

.stats__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: var(--container-max);
  margin-inline: auto;
  padding: clamp(32px, 4vw, 48px) clamp(20px, 4vw, 48px);
  gap: 0;
}

.stats__item {
  flex: 1;
  text-align: center;
  padding-inline: clamp(12px, 2vw, 32px);
}

.stats__number {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1.1;
  margin-block-end: 8px;
}

.stats__prefix {
  font-size: 0.5em;
  color: var(--color-accent);
  opacity: 0.6;
  margin-inline-end: 4px;
  font-weight: 400;
}

.stats__label {
  font-size: clamp(11px, 0.9vw, 13px);
  font-weight: 400;
  color: var(--color-text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.stats__divider {
  width: 1px;
  height: 48px;
  background: var(--color-accent);
  opacity: 0.3;
  flex-shrink: 0;
}


/* ============================================================
   4. WORK / PROJECTS
   ============================================================ */
.work {
  padding-block: var(--section-pad);
  padding-inline: clamp(20px, 4vw, 48px);
}

.work__inner {
  max-width: var(--container-max);
  margin-inline: auto;
}

.work__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--grid-gap);
}

.project-card {
  position: relative;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: clamp(24px, 3vw, 36px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
  transition: border-color var(--duration-base) ease,
              transform var(--duration-base) var(--ease-out-expo),
              box-shadow var(--duration-slow) ease;
}

/* Background glow on hover — set via JS custom property */
.project-card::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 10px;
  background: radial-gradient(ellipse at center, var(--glow-color, transparent) 0%, transparent 70%);
  opacity: 0;
  transition: opacity var(--duration-slow) ease;
  z-index: -1;
}

.project-card:hover::before {
  opacity: 0.18;
}

.project-card:hover {
  border-color: var(--glow-color, var(--color-cyan));
  transform: translateY(-8px) scale(1.01);
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.4),
    0 0 30px color-mix(in srgb, var(--glow-color, var(--color-cyan)) 15%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Giant project number */
.project-card__number {
  position: absolute;
  top: 8px;
  right: 16px;
  font-family: var(--font-mono);
  font-size: 120px;
  font-weight: 800;
  color: var(--color-text);
  opacity: 0.03;
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

.project-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.project-card__name {
  font-family: var(--font-body);
  font-size: clamp(18px, 1.6vw, 24px);
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Status indicator */
.project-card__status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  color: var(--color-accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-card__status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.4; transform: scale(0.7); }
}

.project-card__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.project-card__desc {
  font-size: clamp(13px, 1vw, 15px);
  color: var(--color-text-dim);
  line-height: 1.5;
}

.project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-block-start: auto;
  padding-block-start: 12px;
}

.tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  color: var(--color-text-muted);
  background: var(--color-accent-08);
  border: 1px solid var(--color-border-2);
  border-radius: 4px;
  padding: 3px 10px;
  line-height: 1.4;
  opacity: 1;
  transform: translateX(0);
  transition: color var(--duration-base) ease,
              border-color var(--duration-base) ease,
              transform var(--duration-base) var(--ease-out-expo),
              opacity var(--duration-base) ease;
}

.project-card:hover .tag {
  color: var(--color-text-dim);
  border-color: var(--color-accent-20);
  animation: tag-slide-in 0.4s var(--ease-out-expo) both;
}

.project-card:hover .tag:nth-child(1) { animation-delay: 0ms; }
.project-card:hover .tag:nth-child(2) { animation-delay: 60ms; }
.project-card:hover .tag:nth-child(3) { animation-delay: 120ms; }

@keyframes tag-slide-in {
  from {
    opacity: 0.5;
    transform: translateX(12px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.project-card__arrow {
  position: absolute;
  bottom: clamp(24px, 3vw, 36px);
  inset-inline-end: clamp(24px, 3vw, 36px);
  font-size: 18px;
  color: var(--color-accent);
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity var(--duration-base) ease,
              transform var(--duration-base) var(--ease-out-expo);
}

.project-card:hover .project-card__arrow {
  opacity: 1;
  transform: translateX(0);
}


/* ============================================================
   MARQUEE
   ============================================================ */
.marquee {
  overflow: hidden;
  padding-block: clamp(20px, 3vw, 40px);
  position: relative;
}

.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee-scroll 30s linear infinite;
}

.marquee__text {
  font-family: var(--font-body);
  font-size: clamp(48px, 8vw, 80px);
  font-weight: 800;
  color: #1a1a1a;
  letter-spacing: -0.02em;
  white-space: nowrap;
  line-height: 1;
  user-select: none;
}

@keyframes marquee-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}


/* ============================================================
   5. SERVICES
   ============================================================ */
.services {
  padding-block: var(--section-pad);
  padding-inline: clamp(20px, 4vw, 48px);
}

.services__inner {
  max-width: var(--container-max);
  margin-inline: auto;
}

.service-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 24px;
  padding-block: clamp(24px, 3vw, 36px);
  border-block-start: 1px solid var(--color-border);
  background: transparent;
  overflow: hidden;
  transition: background var(--duration-base) ease,
              padding-inline var(--duration-base) ease;
}

.service-row:last-of-type {
  border-block-end: 1px solid var(--color-border);
}

.service-row:hover {
  background: rgba(0, 229, 255, 0.02);
  padding-inline: clamp(16px, 2vw, 24px);
}

/* Progress bar on hover */
.service-row__progress {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-cyan), var(--color-violet));
  transition: width 0.6s var(--ease-out-expo);
  pointer-events: none;
}

.service-row:hover .service-row__progress {
  width: 100%;
}

.service-row__num {
  font-family: var(--font-mono);
  font-size: clamp(13px, 1vw, 15px);
  font-weight: 500;
  color: var(--color-cyan);
  opacity: 0.7;
  flex-shrink: 0;
  min-width: 32px;
}

.service-row__text { flex: 1; }

.service-row__title {
  font-family: var(--font-body);
  font-size: clamp(18px, 2vw, 28px);
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: -0.01em;
  margin-block-end: 4px;
  transition: text-shadow var(--duration-base) ease;
}

.service-row:hover .service-row__title {
  text-shadow: 0 0 30px rgba(0, 229, 255, 0.4),
               0 0 60px rgba(123, 47, 255, 0.15);
  color: var(--color-cyan);
}

.service-row__desc {
  font-size: clamp(13px, 1vw, 15px);
  color: var(--color-text-dim);
}

.service-row__arrow {
  font-size: clamp(18px, 1.6vw, 24px);
  color: var(--color-accent);
  flex-shrink: 0;
  transition: transform var(--duration-base) var(--ease-out-expo);
}

.service-row:hover .service-row__arrow {
  transform: translateX(20px);
}


/* ============================================================
   6. PHILOSOPHY
   ============================================================ */
.philosophy {
  padding-block: var(--section-pad);
  padding-inline: clamp(20px, 4vw, 48px);
  min-height: 60vh;
  display: flex;
  align-items: center;
  perspective: 1000px;
}

.philosophy__inner {
  max-width: 800px;
  margin-inline: auto;
  text-align: center;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.15s ease-out;
  will-change: transform;
}

/* Decorative quote marks */
.philosophy__deco-open,
.philosophy__deco-close {
  position: absolute;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(120px, 20vw, 200px);
  color: var(--color-accent);
  opacity: 0.06;
  line-height: 0.7;
  pointer-events: none;
  user-select: none;
}

.philosophy__deco-open {
  top: -30px;
  left: -20px;
}

.philosophy__deco-close {
  bottom: 20px;
  right: -20px;
}

/* Horizontal rules */
.philosophy__rule {
  width: 60px;
  height: 1px;
  background: var(--color-accent);
  margin-inline: auto;
  transform: scaleX(0);
  transition: transform 0.8s var(--ease-out-expo);
}

.philosophy__rule--top { margin-block-end: clamp(24px, 3vw, 40px); }
.philosophy__rule--bottom { margin-block-start: clamp(24px, 3vw, 40px); }

.philosophy__inner.is-visible .philosophy__rule {
  transform: scaleX(1);
}

.philosophy__quote {
  font-family: var(--font-body);
  font-size: clamp(32px, 6vw, 72px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--color-text);
}

.philosophy__accent {
  background: var(--grad-nexus-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  text-shadow: 0 0 40px rgba(0, 229, 255, 0.25);
}

.philosophy__cite {
  display: block;
  margin-block-start: clamp(24px, 3vw, 40px);
  font-family: var(--font-mono);
  font-style: normal;
  font-size: clamp(12px, 1vw, 14px);
  color: var(--color-text-muted);
  letter-spacing: 0.05em;
}


/* ============================================================
   7. CONTACT
   ============================================================ */
.contact {
  padding-block: var(--section-pad);
  padding-inline: clamp(20px, 4vw, 48px);
}

.contact__inner {
  max-width: var(--container-max);
  margin-inline: auto;
  text-align: center;
}

.contact__heading {
  font-family: var(--font-body);
  font-size: clamp(32px, 5vw, 64px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--color-text);
  margin-block-end: clamp(24px, 3vw, 40px);
}

.contact__email {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: clamp(16px, 2vw, 24px);
  color: var(--color-accent);
  letter-spacing: 0.01em;
  margin-block-end: 16px;
  position: relative;
  padding: 8px 16px;
  border-radius: 4px;
  transition: opacity var(--duration-base) ease,
              background var(--duration-base) ease,
              transform 0.1s ease-out;
  will-change: transform;
}

.contact__email::after {
  content: '';
  position: absolute;
  bottom: 4px;
  inset-inline: 16px;
  height: 1px;
  background: var(--color-accent);
  opacity: 0.3;
  transition: opacity var(--duration-base) ease;
}

.contact__email:hover {
  background: var(--color-accent-08);
}

.contact__email:hover::after {
  opacity: 0.6;
}

.contact__location {
  font-size: clamp(13px, 1vw, 15px);
  color: var(--color-text-dim);
  margin-block-end: clamp(20px, 2vw, 28px);
}

.contact__socials {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.contact__social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--color-border-2);
  border-radius: 50%;
  transition: border-color var(--duration-base) ease,
              background var(--duration-base) ease,
              color var(--duration-base) ease;
}

.contact__social-link:hover {
  border-color: var(--color-accent);
  background: var(--color-accent-08);
  color: var(--color-accent);
}

.contact__social-icon {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-dim);
  transition: color var(--duration-base) ease;
}

.contact__social-link:hover .contact__social-icon {
  color: var(--color-accent);
}


/* ============================================================
   8. FOOTER
   ============================================================ */
.footer {
  border-block-start: 1px solid var(--color-accent-20);
  padding-inline: clamp(20px, 4vw, 48px);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-block: 24px;
}

.footer__copy,
.footer__location {
  font-size: 12px;
  color: var(--color-text-muted);
  letter-spacing: 0.03em;
}

.footer__links {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.footer__link {
  color: var(--color-text-dim);
  transition: color var(--duration-base) ease;
}

.footer__link:hover {
  color: var(--color-accent);
}

.footer__sep {
  color: var(--color-text-muted);
}


/* ============================================================
   SCROLL REVEAL — with directional offset
   ============================================================ */
[data-reveal] {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity var(--duration-slow) var(--ease-out-expo),
              transform var(--duration-slow) var(--ease-out-expo);
}

[data-reveal][data-reveal-dir="left"] {
  transform: translate(-40px, 20px);
}

[data-reveal][data-reveal-dir="right"] {
  transform: translate(40px, 20px);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translate(0, 0);
}


/* ============================================================
   EASTER EGG FLASH
   ============================================================ */
.easter-flash {
  position: fixed;
  inset: 0;
  background: var(--color-accent);
  z-index: 10001;
  pointer-events: none;
  animation: flash-out 0.4s ease-out forwards;
}

@keyframes flash-out {
  0% { opacity: 0.6; }
  100% { opacity: 0; }
}


/* ============================================================
   VIEW TIMELINE PROGRESSIVE ENHANCEMENT
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    @keyframes card-grow {
      from {
        opacity: 0;
        transform: translateY(60px) scale(0.95) rotateX(10deg);
      }
    }
    @keyframes card-shrink {
      to {
        opacity: 0;
        transform: translateY(-60px) scale(0.95) rotateX(-10deg);
      }
    }

    .project-card {
      animation:
        card-grow auto linear backwards,
        card-shrink auto linear forwards;
      animation-timeline: view();
      animation-range: entry 0% entry 35%, exit 65% exit 100%;
      transform-origin: center center;
    }
  }
}


/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .hero__content {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
    padding-block-start: 40px;
  }
  .hero__content-left {
    align-items: center;
  }
  .hero__hologram {
    max-width: 280px;
    margin-inline: auto;
  }
  .work__grid { gap: 16px; }
  .hero__geometric { right: 5%; width: 80px; height: 80px; }
}

@media (max-width: 768px) {
  .nav__links { gap: 16px; }
  .nav__link { font-size: 13px; }
  .work__grid { grid-template-columns: 1fr; }
  .hero__content {
    padding-block-start: 60px;
  }

  .stats__inner {
    flex-wrap: wrap;
    gap: 24px;
  }
  .stats__item { flex: 0 0 40%; }
  .stats__divider { display: none; }
  .service-row__arrow { margin-inline-start: 0; }
  .hero__geometric { display: none; }
  .project-card__number { font-size: 80px; }

  .philosophy__deco-open,
  .philosophy__deco-close {
    font-size: 100px;
  }

  /* Reset directional reveals on mobile */
  [data-reveal][data-reveal-dir="left"],
  [data-reveal][data-reveal-dir="right"] {
    transform: translateY(32px);
  }
}

@media (max-width: 480px) {
  .nav__links { gap: 12px; }
  .nav__link { font-size: 12px; }

  .hero__headline {
    font-size: clamp(38px, 12vw, 60px);
  }

  .stats__item { flex: 0 0 100%; }

  .project-card { padding: 20px; }
  .project-card__number { font-size: 60px; }

  .service-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .service-row__num {
    position: absolute;
    top: clamp(24px, 3vw, 36px);
    right: clamp(16px, 2vw, 24px);
  }

  .footer__inner {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}


/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  html {
    scroll-snap-type: none;
  }

  .char-stagger {
    opacity: 1;
    transform: none;
  }

  .glitch {
    opacity: 1;
    transform: none;
  }

  .hero__sub,
  .hero__cta {
    opacity: 1;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .hero__cta-arrow,
  .hero__scanline,
  .hero__geometric,
  .marquee__track {
    animation: none;
  }

  .cursor-dot,
  .cursor-trail,
  .click-ripple,
  .noise-overlay {
    display: none;
  }

  .loader {
    display: none;
  }

  body {
    cursor: auto;
  }
}
