/* ========================================
   CYBERPUNK NEON DESIGN TOKENS
   ======================================== */

:root {
  /* Type scale */
  --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem  + 0.35vw, 1rem);
  --text-base: clamp(1rem,     0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem    + 0.75vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1.2rem  + 1.25vw, 2.25rem);
  --text-2xl:  clamp(2rem,     1.2rem  + 2.5vw,  3.5rem);
  --text-3xl:  clamp(2.5rem,   1rem    + 4vw,    5rem);
  --text-hero: clamp(3rem,     0.5rem  + 7vw,    8rem);

  /* Spacing */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Cyberpunk Colors */
  --color-bg:          #06060f;
  --color-surface:     #0c0c1a;
  --color-surface-2:   #111125;
  --color-border:      rgba(0, 240, 255, 0.12);
  --color-text:        #e0dfe8;
  --color-text-muted:  #8888aa;
  --color-text-faint:  #55557a;
  --color-cyan:        #00f0ff;
  --color-pink:        #ff00aa;
  --color-purple:      #8b5cf6;
  --color-cyan-dim:    rgba(0, 240, 255, 0.08);
  --color-pink-dim:    rgba(255, 0, 170, 0.08);

  /* Fonts */
  --font-display: 'JetBrains Mono', 'Fira Code', monospace;
  --font-body: 'Inter', 'Helvetica Neue', sans-serif;

  /* Transitions */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* Glow effects */
  --glow-cyan: 0 0 20px rgba(0, 240, 255, 0.4), 0 0 60px rgba(0, 240, 255, 0.1);
  --glow-pink: 0 0 20px rgba(255, 0, 170, 0.4), 0 0 60px rgba(255, 0, 170, 0.1);
  --glow-purple: 0 0 20px rgba(139, 92, 246, 0.4), 0 0 60px rgba(139, 92, 246, 0.1);

  /* Content widths */
  --content-default: 1100px;
  --content-wide: 1300px;
}


/* ========================================
   UTILITY CLASSES
   ======================================== */

.text-gradient {
  background: linear-gradient(135deg, var(--color-cyan), var(--color-pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.container {
  width: 100%;
  max-width: var(--content-default);
  margin: 0 auto;
  padding-inline: var(--space-6);
}

.blink {
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* ========================================
   SCANLINE OVERLAY
   ======================================== */

.scanlines {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
}

/* ========================================
   PARTICLE CANVAS
   ======================================== */

#particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ========================================
   NAVIGATION
   ======================================== */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: var(--space-4) 0;
  transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.3s var(--ease-out);
}

.nav--scrolled {
  background: rgba(6, 6, 15, 0.85);
  backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--color-border);
}

.nav--hidden {
  transform: translateY(-100%);
}

.nav__inner {
  max-width: var(--content-wide);
  margin: 0 auto;
  padding-inline: var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-text);
  transition: color var(--transition-interactive);
}

.nav__logo:hover {
  color: var(--color-cyan);
}

.nav__name {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.nav__link {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  transition: color var(--transition-interactive);
  position: relative;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-cyan);
  transition: width 0.3s var(--ease-out);
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.5);
}

.nav__link:hover {
  color: var(--color-cyan);
}

.nav__link:hover::after {
  width: 100%;
}

.nav__link--cta {
  color: var(--color-cyan);
  border: 1px solid rgba(0, 240, 255, 0.3);
  padding: var(--space-2) var(--space-4);
  border-radius: 4px;
  transition: all var(--transition-interactive);
}

.nav__link--cta::after {
  display: none;
}

.nav__link--cta:hover {
  background: rgba(0, 240, 255, 0.1);
  border-color: var(--color-cyan);
  box-shadow: var(--glow-cyan);
}

.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-2);
}

.nav__burger span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--color-text);
  transition: all 0.3s var(--ease-out);
}

.nav__burger.active span:nth-child(1) {
  transform: rotate(45deg) translate(4px, 5px);
}
.nav__burger.active span:nth-child(2) {
  opacity: 0;
}
.nav__burger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(4px, -5px);
}

/* Mobile menu */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99;
  background: rgba(6, 6, 15, 0.97);
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-8);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease-out);
}

.mobile-menu.active {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu__link {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 500;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: color var(--transition-interactive);
}

.mobile-menu__link:hover {
  color: var(--color-cyan);
}

@media (max-width: 768px) {
  .nav__links { display: none; }
  .nav__burger { display: flex; }
}

/* ========================================
   HERO SECTION
   ======================================== */

.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__img {
  width: 100%;
  height: 120%;
  object-fit: cover;
  object-position: center 30%;
  will-change: transform;
  opacity: 0;
  transition: opacity 0.8s ease-out;
}

.hero__img.loaded {
  opacity: 1;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: 
    linear-gradient(180deg, rgba(6,6,15,0.4) 0%, rgba(6,6,15,0.6) 40%, rgba(6,6,15,0.92) 80%, var(--color-bg) 100%),
    linear-gradient(90deg, rgba(6,6,15,0.7) 0%, transparent 40%, transparent 60%, rgba(6,6,15,0.7) 100%);
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: var(--content-default);
  margin: 0 auto;
  padding: var(--space-32) var(--space-6) var(--space-16);
  width: 100%;
}

.hero__label {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  color: var(--color-cyan);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: var(--space-6);
}

.hero__title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  line-height: 1.1;
  color: #fff;
  margin-bottom: var(--space-6);
}

.hero__title .line {
  display: block;
}

.hero__sub {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 560px;
  margin-bottom: var(--space-10);
  line-height: 1.7;
}

.hero__actions {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.hero__scroll {
  position: absolute;
  bottom: var(--space-8);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-text-faint);
  font-family: var(--font-display);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.hero__scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(180deg, var(--color-cyan), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(1.2); }
}


/* ========================================
   BUTTONS
   ======================================== */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: var(--space-3) var(--space-8);
  border-radius: 4px;
  overflow: hidden;
  transition: all var(--transition-interactive);
}

.btn--primary {
  background: linear-gradient(135deg, rgba(0,240,255,0.15), rgba(139,92,246,0.15));
  color: var(--color-cyan);
  border: 1px solid rgba(0, 240, 255, 0.4);
}

.btn--primary:hover {
  background: linear-gradient(135deg, rgba(0,240,255,0.25), rgba(139,92,246,0.25));
  box-shadow: var(--glow-cyan);
  border-color: var(--color-cyan);
  transform: translateY(-2px);
}

.btn--primary:active {
  transform: translateY(0);
}

.btn__glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(0,240,255,0.1) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.btn--primary:hover .btn__glow {
  opacity: 1;
}

.btn--ghost {
  color: var(--color-text-muted);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn--ghost:hover {
  color: var(--color-text);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.btn--ghost:active {
  transform: translateY(0);
}

/* ========================================
   SECTIONS
   ======================================== */

.section {
  position: relative;
  padding: clamp(var(--space-16), 10vw, var(--space-32)) 0;
  overflow: hidden;
}

.section--dark {
  background: var(--color-surface);
}

.section__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.section__bg-img {
  width: 100%;
  height: 140%;
  object-fit: cover;
  opacity: 0;
  will-change: transform;
  transition: opacity 0.8s ease-out;
}

.section__bg-img.loaded {
  opacity: 0.2;
}

.section__bg-overlay {
  position: absolute;
  inset: 0;
  background: 
    linear-gradient(180deg, var(--color-bg) 0%, rgba(6,6,15,0.7) 20%, rgba(6,6,15,0.7) 80%, var(--color-bg) 100%);
}

.section > .container {
  position: relative;
  z-index: 1;
}

.section__header {
  text-align: center;
  margin-bottom: clamp(var(--space-10), 5vw, var(--space-16));
}

.section__tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: var(--text-xs);
  color: var(--color-pink);
  letter-spacing: 0.1em;
  margin-bottom: var(--space-4);
  opacity: 0.8;
}

.section__title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: #fff;
  margin-bottom: var(--space-4);
}

.section__desc {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 500px;
  margin: 0 auto;
}


/* ========================================
   SERVICE CARDS
   ======================================== */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-6);
}

.card {
  position: relative;
  background: rgba(12, 12, 26, 0.7);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: var(--space-8);
  backdrop-filter: blur(8px);
  transition: all 0.4s var(--ease-out);
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-cyan), var(--color-pink), var(--color-purple));
  opacity: 0;
  transition: opacity 0.4s var(--ease-out);
}

.card:hover {
  border-color: rgba(0, 240, 255, 0.25);
  transform: translateY(-4px);
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.4),
    0 0 40px rgba(0, 240, 255, 0.05);
}

.card:hover::before {
  opacity: 1;
}

.card__icon {
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
}

.card__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: #fff;
  margin-bottom: var(--space-3);
}

.card__text {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: var(--space-6);
}

.card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.tag {
  font-family: var(--font-display);
  font-size: 0.7rem;
  color: var(--color-cyan);
  background: var(--color-cyan-dim);
  border: 1px solid rgba(0, 240, 255, 0.15);
  padding: 2px 10px;
  border-radius: 3px;
  letter-spacing: 0.05em;
}


/* ========================================
   TECH STACK
   ======================================== */

.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-8);
}

.stack-group__title {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.neon-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.neon-dot--cyan {
  background: var(--color-cyan);
  box-shadow: 0 0 8px var(--color-cyan), 0 0 20px rgba(0, 240, 255, 0.3);
}

.neon-dot--pink {
  background: var(--color-pink);
  box-shadow: 0 0 8px var(--color-pink), 0 0 20px rgba(255, 0, 170, 0.3);
}

.neon-dot--purple {
  background: var(--color-purple);
  box-shadow: 0 0 8px var(--color-purple), 0 0 20px rgba(139, 92, 246, 0.3);
}

.stack-items {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.stack-item {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: var(--space-2) var(--space-4);
  border-radius: 4px;
  transition: all 0.3s var(--ease-out);
}

.stack-item:hover {
  color: var(--color-cyan);
  border-color: rgba(0, 240, 255, 0.25);
  background: var(--color-cyan-dim);
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.1);
}


/* ========================================
   ABOUT SECTION
   ======================================== */

.about-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(var(--space-8), 5vw, var(--space-16));
  align-items: center;
}

.about__content .section__tag {
  display: block;
  text-align: left;
  margin-bottom: var(--space-4);
}

.about__content .section__title {
  text-align: left;
  margin-bottom: var(--space-6);
}

.about__text {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
  line-height: 1.7;
}

.about__stats {
  display: flex;
  gap: var(--space-8);
  margin-top: var(--space-8);
  padding-top: var(--space-8);
  border-top: 1px solid var(--color-border);
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat__value {
  display: flex;
  align-items: baseline;
  white-space: nowrap;
}

.stat__number {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-cyan);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stat__suffix {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-cyan);
  line-height: 1;
}

.stat__label {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: var(--space-2);
}


/* ========================================
   TERMINAL
   ======================================== */

.terminal {
  background: rgba(6, 6, 15, 0.9);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.terminal__header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--color-border);
}

.terminal__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.terminal__dot--red { background: #ff5f56; }
.terminal__dot--yellow { background: #ffbd2e; }
.terminal__dot--green { background: #27c93f; }

.terminal__title {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-left: auto;
  margin-right: auto;
}

.terminal__body {
  padding: var(--space-6);
}

.terminal__line {
  font-family: var(--font-display);
  font-size: 0.82rem;
  line-height: 1.9;
  color: var(--color-text-muted);
}

.t-prompt {
  color: var(--color-cyan);
}

.t-cmd {
  color: var(--color-pink);
}

.t-key {
  color: var(--color-purple);
}

.t-val {
  color: var(--color-cyan);
}


/* ========================================
   CONTACT
   ======================================== */

.contact-layout {
  text-align: center;
}

.contact__header {
  margin-bottom: clamp(var(--space-8), 4vw, var(--space-12));
}

.contact__methods {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-6);
  max-width: 800px;
  margin: 0 auto;
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-8) var(--space-6);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  transition: all 0.4s var(--ease-out);
}

.contact-card:hover {
  border-color: rgba(0, 240, 255, 0.3);
  background: rgba(0, 240, 255, 0.04);
  transform: translateY(-4px);
  box-shadow: var(--glow-cyan);
}

.contact-card__icon {
  color: var(--color-cyan);
}

.contact-card__label {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.contact-card__value {
  font-size: var(--text-sm);
  color: var(--color-text);
}


/* ========================================
   TESTIMONIALS
   ======================================== */

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-6);
}

.testimonial {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  transition: all 0.4s var(--ease-out);
}

.testimonial:hover {
  border-color: rgba(0, 240, 255, 0.2);
  transform: translateY(-2px);
}

.testimonial__quote {
  opacity: 0.5;
}

.testimonial__text {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.8;
  font-style: italic;
  flex: 1;
}

.testimonial__author {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
}

.testimonial__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(0,240,255,0.15), rgba(139,92,246,0.15));
  border: 1px solid rgba(0, 240, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-cyan);
  flex-shrink: 0;
}

.testimonial__info {
  display: flex;
  flex-direction: column;
}

.testimonial__name {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
}

.testimonial__role {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}


/* ========================================
   FOOTER
   ======================================== */

.footer {
  border-top: 1px solid var(--color-border);
  padding: var(--space-6) 0;
  background: var(--color-bg);
}

.footer__inner {
  display: flex;
  justify-content: center;
  align-items: center;
}

.footer__copy {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}


/* ========================================
   SCROLL ANIMATIONS
   ======================================== */

.fade-in {
  opacity: 1;
}

@supports (animation-timeline: scroll()) {
  .fade-in {
    opacity: 0;
    animation: revealFade 1s linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 35%;
  }
}

@keyframes revealFade {
  to { opacity: 1; }
}

/* JS fallback for browsers without scroll animation support */
.fade-in.is-visible {
  opacity: 1;
  transition: opacity 0.8s var(--ease-out);
}


/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 900px) {
  .about-layout {
    grid-template-columns: 1fr;
    gap: var(--space-10);
  }

  .about__stats {
    gap: var(--space-6);
  }
}

@media (max-width: 600px) {
  .hero__title {
    font-size: var(--text-2xl);
  }

  .about__stats {
    flex-direction: column;
    gap: var(--space-4);
  }

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

  .hero__content {
    padding-top: var(--space-24);
  }

  .hero__scroll {
    display: none;
  }
}
