/* ============================================
   UMAR DARAZ - PORTFOLIO STYLESHEET
   style.css | Main Stylesheet
   ============================================ */

/* ---------- CSS VARIABLES (Design Tokens) ---------- */
:root {
  --color-bg:         #0a0a0f;
  --color-surface:    #12121a;
  --color-card:       #1a1a26;
  --color-border:     #2a2a3e;
  --color-accent:     #00d4ff;
  --color-accent2:    #7b5ea7;
  --color-gold:       #f5c842;
  --color-text:       #e8e8f0;
  --color-muted:      #8888aa;
  --color-white:      #ffffff;

  --font-display:     'Playfair Display', serif;
  --font-body:        'DM Sans', sans-serif;
  --font-mono:        'JetBrains Mono', monospace;

  --radius-sm:        6px;
  --radius-md:        12px;
  --radius-lg:        20px;
  --radius-xl:        32px;

  --shadow-glow:      0 0 40px rgba(0, 212, 255, 0.15);
  --shadow-card:      0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-gold:      0 0 20px rgba(245, 200, 66, 0.3);

  --transition:       all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow:  all 0.6s cubic-bezier(0.4, 0, 0.2, 1);

  --max-width:        1200px;
  --nav-height:       72px;
}

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

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

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.7;
  overflow-x: hidden;
}

/* ---------- TYPOGRAPHY ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.2;
  color: var(--color-white);
}

h1 { font-size: clamp(2.5rem, 6vw, 5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 3rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.8rem); }
h4 { font-size: 1.1rem; }

p  { color: var(--color-muted); font-size: 1rem; }

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: var(--transition);
}

a:hover { color: var(--color-white); }

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

/* ---------- LAYOUT HELPERS ---------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 100px 0;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 12px;
  display: block;
}

.section-title {
  margin-bottom: 16px;
}

.section-desc {
  font-size: 1.1rem;
  max-width: 560px;
  margin-bottom: 56px;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

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

.text-center { text-align: center; }
.text-accent { color: var(--color-accent); }
.text-gold   { color: var(--color-gold); }

/* ---------- NOISE OVERLAY ---------- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: 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.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: 0.4;
}

/* ---------- NAVIGATION ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border);
  z-index: 1000;
  transition: var(--transition);
}

.navbar.scrolled {
  background: rgba(10, 10, 15, 0.97);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--color-white);
  font-weight: 700;
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.nav-links a {
  color: var(--color-muted);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-white);
  background: rgba(0, 212, 255, 0.08);
}

.nav-cta {
  background: var(--color-accent) !important;
  color: var(--color-bg) !important;
  font-weight: 600 !important;
  padding: 8px 20px !important;
  border-radius: var(--radius-sm) !important;
}

.nav-cta:hover {
  background: var(--color-white) !important;
  transform: translateY(-1px);
}

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: var(--transition);
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  border: none;
}

.btn-primary {
  background: var(--color-accent);
  color: var(--color-bg);
}

.btn-primary:hover {
  background: var(--color-white);
  color: var(--color-bg);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.btn-outline {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn-outline:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  transform: translateY(-2px);
}

.btn-gold {
  background: var(--color-gold);
  color: var(--color-bg);
}

.btn-gold:hover {
  background: #ffe066;
  transform: translateY(-2px);
  box-shadow: var(--shadow-gold);
}

/* ---------- CARDS ---------- */
.card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: var(--transition);
}

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

/* ---------- BADGE ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.badge-accent {
  background: rgba(0, 212, 255, 0.1);
  color: var(--color-accent);
  border: 1px solid rgba(0, 212, 255, 0.25);
}

.badge-gold {
  background: rgba(245, 200, 66, 0.12);
  color: var(--color-gold);
  border: 1px solid rgba(245, 200, 66, 0.3);
}

.badge-green {
  background: rgba(0, 200, 100, 0.1);
  color: #00c864;
  border: 1px solid rgba(0, 200, 100, 0.25);
}

/* ---------- STATS ROW ---------- */
.stats-row {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}

.stat-item {}
.stat-number {
  font-family: var(--font-display);
  font-size: 2.4rem;
  color: var(--color-accent);
  font-weight: 700;
  line-height: 1;
}

.stat-label {
  font-size: 0.82rem;
  color: var(--color-muted);
  margin-top: 4px;
}

/* ---------- PAGE HERO (inner pages) ---------- */
.page-hero {
  padding: calc(var(--nav-height) + 60px) 0 60px;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(0,212,255,0.06) 0%, transparent 70%);
  border-bottom: 1px solid var(--color-border);
  text-align: center;
}

/* ---------- FOOTER ---------- */
.footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: 64px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand p {
  margin-top: 12px;
  font-size: 0.9rem;
  max-width: 280px;
}

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

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

.footer-col ul a {
  color: var(--color-muted);
  font-size: 0.92rem;
  transition: var(--transition);
}

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

.footer-bottom {
  border-top: 1px solid var(--color-border);
  padding-top: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--color-muted);
}

.footer-social {
  display: flex;
  gap: 12px;
}

.footer-social a {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-muted);
  font-size: 1rem;
  transition: var(--transition);
}

.footer-social a:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: rgba(0,212,255,0.07);
}

/* ---------- SCROLL ANIMATIONS ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }
.fade-in-delay-4 { transition-delay: 0.4s; }

/* ---------- DIVIDER ---------- */
.divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent), transparent);
  border-radius: 2px;
  margin: 20px 0 32px;
}

.divider-center { margin-left: auto; margin-right: auto; }

/* ---------- RESPONSIVE ---------- */

/* Hamburger menu activates at 1024px and below (covers all laptops/tablets) */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }

  .nav-links {
    display: none;
  }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(10, 10, 15, 0.98);
    backdrop-filter: blur(20px);
    padding: 24px;
    border-bottom: 1px solid var(--color-border);
    gap: 4px;
    z-index: 999;
  }
  .nav-links.open a { padding: 12px 16px; display: block; }
  .nav-toggle { display: flex; }
}

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }

  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }

  .stats-row { gap: 24px; }
  .section { padding: 64px 0; }
}

/* ---------- FLOATING ACTION BUTTONS (WhatsApp + Upwork) ---------- */
.fab-group {
  position: fixed;
  bottom: 32px;
  right: 32px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
  z-index: 9999;
}

.fab-btn {
  position: relative;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  opacity: 0;
  transform: scale(0) translateY(16px);
  transition: transform 0.18s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.18s ease, filter 0.18s ease, opacity 0.18s ease;
  flex-shrink: 0;
}

.fab-btn:hover {
  opacity: 1 !important;
  transform: scale(1.14) translateY(0) !important;
  filter: brightness(1.12);
  animation: none !important;
}

.fab-btn svg {
  width: 30px;
  height: 30px;
  fill: #ffffff;
  display: block;
  flex-shrink: 0;
  pointer-events: none;
}

/* WhatsApp */
.fab-wa {
  background: #25D366;
  box-shadow: 0 4px 18px rgba(37,211,102,0.45);
  animation: fabIn 0.65s cubic-bezier(0.34,1.56,0.64,1) 1.2s forwards,
             fabPulseGreen 2.6s ease-in-out 2.4s infinite;
}
.fab-wa:hover {
  box-shadow: 0 6px 26px rgba(37,211,102,0.65) !important;
}

/* Upwork */
.fab-upwork {
  background: #14a800;
  box-shadow: 0 4px 18px rgba(20,168,0,0.40);
  animation: fabIn 0.65s cubic-bezier(0.34,1.56,0.64,1) 1.55s forwards,
             fabPulseGreen 2.6s ease-in-out 2.8s infinite;
}
.fab-upwork:hover {
  box-shadow: 0 6px 26px rgba(20,168,0,0.60) !important;
}

/* Tooltip */
.fab-btn .fab-tip {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%) translateX(6px);
  background: rgba(10,10,20,0.92);
  color: #fff;
  font-size: 0.78rem;
  font-family: var(--font-body, sans-serif);
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 7px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(6px);
}

.fab-btn .fab-tip::after {
  content: '';
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  border: 5px solid transparent;
  border-left-color: rgba(10,10,20,0.92);
}

.fab-btn:hover .fab-tip {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

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

@keyframes fabPulseGreen {
  0%, 100% { box-shadow: 0 4px 18px rgba(37,211,102,0.45); }
  50%       { box-shadow: 0 4px 28px rgba(37,211,102,0.7), 0 0 0 8px rgba(37,211,102,0.07); }
}
