/* ============================================
   SHAHRUKH JAVED — PORTFOLIO
   Global Styles
   ============================================ */

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

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

:root {
  --black:   #0a0a0a;
  --white:   #f0ede8;
  --gray:    #1a1a1a;
  --mid:     #2a2a2a;
  --muted:   #666666;
  --accent:  #c8ff00;        /* single pop of acid-green — signature color */
  --font-display: 'Space Grotesk', sans-serif;
  --font-mono:    'Space Mono', monospace;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--black);
  color: var(--white);
  font-family: var(--font-display);
  line-height: 1.6;
  overflow-x: hidden;
  cursor: none;
}

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

img {
  display: block;
  max-width: 100%;
}

/* ============================================
   CUSTOM CURSOR
   ============================================ */
.cursor-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.1s ease;
}

.cursor-ring {
  width: 36px;
  height: 36px;
  border: 1.5px solid rgba(200, 255, 0, 0.5);
  border-radius: 50%;
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: all 0.12s ease;
}

.cursor-ring.hover {
  width: 56px;
  height: 56px;
  border-color: var(--accent);
  background: rgba(200, 255, 0, 0.06);
}

/* ============================================
   NAVBAR
   ============================================ */
nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 48px;
  mix-blend-mode: normal;
}

nav::after {
  content: '';
  position: absolute;
  bottom: 0; left: 48px; right: 48px;
  height: 1px;
  background: rgba(240,237,232,0.08);
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--white);
  transition: color 0.3s;
}

.nav-logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 40px;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.3s ease;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--white);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* ============================================
   SIDE SOCIAL BAR (Left Fixed)
   ============================================ */
.side-social {
  position: fixed;
  left: 28px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 900;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.side-social::before,
.side-social::after {
  content: '';
  width: 1px;
  height: 60px;
  background: rgba(240,237,232,0.15);
}

.side-social a {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  writing-mode: vertical-rl;
  transition: color 0.3s ease;
}

.side-social a:hover {
  color: var(--accent);
}

/* ============================================
   PAGE TRANSITION OVERLAY
   ============================================ */
.page-overlay {
  position: fixed;
  inset: 0;
  background: var(--black);
  z-index: 5000;
  transform: scaleY(0);
  transform-origin: bottom;
  pointer-events: none;
}

.page-overlay.enter {
  animation: overlayIn 0.5s cubic-bezier(0.76, 0, 0.24, 1) forwards;
}

.page-overlay.leave {
  animation: overlayOut 0.5s cubic-bezier(0.76, 0, 0.24, 1) forwards;
}

@keyframes overlayIn {
  from { transform: scaleY(0); transform-origin: bottom; }
  to   { transform: scaleY(1); transform-origin: bottom; }
}

@keyframes overlayOut {
  from { transform: scaleY(1); transform-origin: top; }
  to   { transform: scaleY(0); transform-origin: top; }
}

/* ============================================
   SECTION COMMON
   ============================================ */
section {
  position: relative;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 48px;
}

/* ============================================
   REVEAL ANIMATIONS
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

/* staggered children */
.stagger > * {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.stagger.visible > *:nth-child(1) { opacity:1; transform:translateY(0); transition-delay:0.05s; }
.stagger.visible > *:nth-child(2) { opacity:1; transform:translateY(0); transition-delay:0.15s; }
.stagger.visible > *:nth-child(3) { opacity:1; transform:translateY(0); transition-delay:0.25s; }
.stagger.visible > *:nth-child(4) { opacity:1; transform:translateY(0); transition-delay:0.35s; }
.stagger.visible > *:nth-child(5) { opacity:1; transform:translateY(0); transition-delay:0.45s; }
.stagger.visible > *:nth-child(6) { opacity:1; transform:translateY(0); transition-delay:0.55s; }

/* ============================================
   MARQUEE (scrolling text band)
   ============================================ */
.marquee-wrapper {
  overflow: hidden;
  border-top: 1px solid rgba(240,237,232,0.08);
  border-bottom: 1px solid rgba(240,237,232,0.08);
  padding: 18px 0;
}

.marquee-track {
  display: flex;
  gap: 0;
  white-space: nowrap;
  animation: marquee 22s linear infinite;
}

.marquee-track span {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 40px;
}

.marquee-track span.dot {
  color: var(--accent);
  padding: 0;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ============================================
   FOOTER
   ============================================ */
footer {
  background: var(--gray);
  border-top: 1px solid rgba(240,237,232,0.08);
  padding: 60px 48px 40px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 60px;
}

.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 20px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col ul a {
  font-size: 0.9rem;
  color: var(--white);
  opacity: 0.7;
  transition: opacity 0.3s, color 0.3s;
}

.footer-col ul a:hover {
  opacity: 1;
  color: var(--accent);
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 30px;
  border-top: 1px solid rgba(240,237,232,0.08);
}

.footer-bottom p {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.1em;
}

.back-top {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.3s;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.back-top::before {
  content: '↑';
  font-size: 0.9rem;
}

/* ============================================
   UTILITY
   ============================================ */
.accent { color: var(--accent); }

.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(200,255,0,0.3);
  padding: 5px 12px;
  border-radius: 999px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 16px 32px;
  border: 1px solid rgba(240,237,232,0.2);
  color: var(--white);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.76, 0, 0.24, 1);
  z-index: 0;
}

.btn:hover::before { transform: scaleX(1); }

.btn span {
  position: relative;
  z-index: 1;
  transition: color 0.3s ease;
}

.btn:hover span { color: var(--black); }

/* ============================================
   HORIZONTAL RULE DIVIDER
   ============================================ */
.hr {
  border: none;
  border-top: 1px solid rgba(240,237,232,0.08);
  margin: 0;
}

/* ============================================
   SECTION LABEL (eyebrow text)
   ============================================ */
.section-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 48px;
}

.section-label::before {
  content: '';
  width: 32px;
  height: 1px;
  background: var(--accent);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  nav { padding: 20px 24px; }
  nav::after { left: 24px; right: 24px; }
  .nav-links { gap: 24px; }
  .side-social { display: none; }
  .container { padding: 0 24px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  footer { padding: 50px 24px 30px; }
}

@media (max-width: 600px) {
  .nav-links { display: none; }
  .footer-inner { grid-template-columns: 1fr; }
}

/* ============================================
   PRELOADER
   ============================================ */
#preloader {
  position: fixed;
  inset: 0;
  background: var(--black);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 24px;
}

#preloader .pre-name {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
  overflow: hidden;
}

#preloader .pre-name span {
  display: inline-block;
  animation: slideUp 0.6s cubic-bezier(0.76, 0, 0.24, 1) 0.3s forwards;
  transform: translateY(100%);
  opacity: 0;
}

#preloader .pre-count {
  font-family: var(--font-mono);
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1;
}

#preloader .pre-bar {
  width: 200px;
  height: 1px;
  background: rgba(240,237,232,0.1);
  position: relative;
  overflow: hidden;
}

#preloader .pre-bar-fill {
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width 0.05s linear;
}

@keyframes slideUp {
  to { transform: translateY(0); opacity: 1; }
}