/* ============================================================
   GLOBAL STYLES — style.css
   Portfolio | Clean Professional Light Theme
   ============================================================ */

/* === CSS VARIABLES === */
:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f7f8fc;
  --bg-card: #ffffff;
  --border: #e5e7eb;
  --border-focus: #6366f1;

  --text-primary: #111827;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;

  --accent: #6366f1;
  --accent-dark: #4f46e5;
  --accent-light: #eef2ff;
  --accent-blue: #3b82f6;
  --accent-green: #10b981;
  --accent-pink: #ec4899;

  --gradient: linear-gradient(135deg, #6366f1 0%, #3b82f6 100%);

  --nav-h: 68px;
  --container-max: 1140px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.06);
  --shadow: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 40px rgba(99,102,241,0.12);
  --transition: 0.25s ease;
}

/* === DARK THEME OVERRIDES === */
[data-theme="dark"] {
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-card: #161616;
  --border: #2a2a2a;
  --border-focus: #818cf8;

  --text-primary: #f0f0f0;
  --text-secondary: #a0a0a0;
  --text-muted: #6b6b6b;

  --accent: #818cf8;
  --accent-dark: #6366f1;
  --accent-light: rgba(99,102,241,0.15);
  --accent-blue: #60a5fa;
  --accent-green: #34d399;
  --accent-pink: #f472b6;

  --gradient: linear-gradient(135deg, #818cf8 0%, #60a5fa 100%);

  --shadow-sm: 0 1px 4px rgba(0,0,0,0.4);
  --shadow: 0 4px 16px rgba(0,0,0,0.5);
  --shadow-lg: 0 12px 40px rgba(129,140,248,0.15);
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Outfit', 'Inter', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; }
ul { list-style: none; }

/* === SCROLLBAR === */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* === BACK BUTTON === */
.back-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 7px 14px;
  border-radius: 50px;
  margin-bottom: 28px;
  transition: color var(--transition), border-color var(--transition), background var(--transition), transform var(--transition);
}
.back-btn:hover {
  color: var(--accent);
  border-color: rgba(99,102,241,0.3);
  background: var(--accent-light);
  transform: translateX(-3px);
}
.back-btn svg { transition: transform var(--transition); flex-shrink: 0; }
.back-btn:hover svg { transform: translateX(-3px); }

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

/* === SECTION === */
.section { padding: 96px 0; }

/* === NAVIGATION === */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  background: rgba(255,255,255,0);
  transition: background var(--transition), box-shadow var(--transition);
}
#navbar.scrolled {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--border);
}
[data-theme="dark"] #navbar.scrolled {
  background: rgba(10,10,10,0.95);
}
.nav-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}
.logo-dot {
  width: 7px; height: 7px;
  background: var(--accent);
  border-radius: 50%;
}
.accent { color: var(--accent); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav-link {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}
.nav-link:hover { color: var(--accent); background: var(--accent-light); }
.nav-link.active { color: var(--accent); background: var(--accent-light); font-weight: 600; }

/* Hamburger */
.hamburger { display: none; flex-direction: column; gap: 5px; padding: 6px; cursor: pointer; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--text-primary); border-radius: 2px; transition: var(--transition); }
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile Menu */
.mobile-menu {
  position: fixed; inset: 0;
  background: rgba(255,255,255,0.98);
  backdrop-filter: blur(20px);
  z-index: 99;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
}
[data-theme="dark"] .mobile-menu {
  background: rgba(10,10,10,0.98);
}
.mobile-menu.open { opacity: 1; pointer-events: all; }
.mobile-menu-inner { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.mobile-link {
  font-size: 1.6rem; font-weight: 700;
  color: var(--text-secondary);
  padding: 8px 24px; border-radius: var(--radius);
  transition: color var(--transition), background var(--transition);
}
.mobile-link:hover { color: var(--accent); background: var(--accent-light); }

/* === BUTTONS === */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 26px; border-radius: 50px;
  font-size: 0.9rem; font-weight: 600;
  transition: all var(--transition);
  cursor: pointer; border: none; white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 12px rgba(99,102,241,0.25);
}
.btn-primary:hover {
  background: var(--accent-dark);
  box-shadow: 0 6px 24px rgba(99,102,241,0.35);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}
.btn-ghost:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-1px);
}

/* === TYPOGRAPHY HELPERS === */
.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-label {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--accent); margin-bottom: 14px;
}
.section-label::before {
  content: '';
  display: block;
  width: 18px; height: 2px;
  background: var(--accent);
  border-radius: 1px;
}
.section-title {
  font-size: clamp(1.9rem, 3.5vw, 2.6rem);
  font-weight: 800; letter-spacing: -0.8px; line-height: 1.15;
  margin-bottom: 14px; color: var(--text-primary);
}
.section-sub {
  font-size: 1rem; color: var(--text-secondary);
  max-width: 500px; margin-bottom: 56px; line-height: 1.7;
}
.section-cta { text-align: center; margin-top: 52px; }

/* === PAGE HERO (inner pages) === */
.page-hero {
  min-height: 28vh;
  display: flex; align-items: flex-end;
  padding: calc(var(--nav-h) + 56px) 0 64px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
  position: relative;
}
.page-hero-glow { display: none; }

/* Back button — absolutely pinned top-left, same as thankyou page */
.page-hero .back-btn {
  position: absolute;
  top: calc(var(--nav-h) + 24px);
  left: max(24px, calc((100% - var(--container-max)) / 2 + 24px));
  margin-bottom: 0;
}
.page-hero-label {
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--accent); margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px;
}
.page-hero-label::before {
  content: '';
  display: block; width: 18px; height: 2px;
  background: var(--accent); border-radius: 1px;
}
.page-hero-title {
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 900; letter-spacing: -1.5px; line-height: 1.05;
  margin-bottom: 16px; color: var(--text-primary);
}
.page-hero-desc { font-size: 1rem; color: var(--text-secondary); max-width: 440px; }

/* === ANIMATE CLASSES === */
.animate-fadeup {
  opacity: 0; transform: translateY(20px);
  animation: fadeUp 0.65s ease forwards;
  animation-delay: var(--delay, 0s);
}
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }

/* === SCROLL REVEAL === */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* === FOOTER === */
#footer {
  padding: 56px 0 28px;
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
}
.footer-top {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 36px; gap: 32px; flex-wrap: wrap;
}
.footer-brand .nav-logo { margin-bottom: 8px; }
.footer-brand p { color: var(--text-muted); font-size: 0.88rem; max-width: 200px; line-height: 1.6; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; }
.footer-links a { color: var(--text-secondary); font-size: 0.88rem; transition: color var(--transition); }
.footer-links a:hover { color: var(--accent); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 20px; border-top: 1px solid var(--border); flex-wrap: wrap; gap: 12px;
}
.footer-bottom p { color: var(--text-muted); font-size: 0.82rem; }
.footer-thanks { color: var(--text-muted); font-size: 0.82rem; transition: color var(--transition); }
.footer-thanks:hover { color: var(--accent-pink); }

/* === PRELOADER === */
#preloader {
  position: fixed; inset: 0; background: var(--bg-primary);
  z-index: 1000; display: flex; align-items: center; justify-content: center;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
#preloader.hidden { opacity: 0; visibility: hidden; }
.preloader-inner { text-align: center; }
.preloader-logo { font-size: 1.6rem; font-weight: 900; letter-spacing: 3px; margin-bottom: 20px; }
.logo-text { color: var(--text-primary); }
.logo-accent { color: var(--accent); }
.preloader-bar { width: 160px; height: 2px; background: var(--border); border-radius: 1px; overflow: hidden; margin: 0 auto; }
.preloader-fill { height: 100%; background: var(--accent); animation: loading 0.8s ease forwards; }
@keyframes loading { from { width: 0; } to { width: 100%; } }

/* === TECH MARQUEE === */
#tech-marquee { padding: 32px 0; overflow: hidden; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--bg-secondary); }
.marquee-label { text-align: center; font-size: 0.68rem; font-weight: 700; letter-spacing: 2.5px; text-transform: uppercase; color: var(--text-muted); margin-bottom: 16px; }
.marquee-track { overflow: hidden; }
.marquee-inner { display: flex; gap: 28px; white-space: nowrap; animation: marquee 30s linear infinite; width: max-content; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.marquee-item { font-size: 0.92rem; font-weight: 600; color: var(--text-secondary); flex-shrink: 0; }
.marquee-dot { color: var(--accent); opacity: 0.4; flex-shrink: 0; }

/* === RESPONSIVE === */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .section { padding: 72px 0; }
}
@media (max-width: 768px) {
  /* Page hero — stack back button above content, remove absolute positioning */
  .page-hero {
    flex-direction: column;
    align-items: flex-start;
    padding: calc(var(--nav-h) + 20px) 0 48px;
    min-height: unset;
  }
  .page-hero .container {
    display: flex;
    flex-direction: column;
    width: 100%;
  }
  .page-hero .back-btn {
    position: static;
    margin-bottom: 20px;
    /* Smaller on mobile */
    font-size: 0.75rem;
    padding: 5px 11px;
    gap: 5px;
  }
  .page-hero .back-btn svg {
    width: 13px; height: 13px;
  }
  .page-hero-title {
    font-size: clamp(1.9rem, 8vw, 3rem);
  }
}
@media (max-width: 600px) {
  .container { padding: 0 16px; }
  .btn { padding: 11px 20px; font-size: 0.88rem; }
  .section { padding: 56px 0; }
}

/* === THEME TOGGLE SWITCH === */
.theme-toggle {
  position: relative;
  width: 52px;
  height: 28px;
  flex-shrink: 0;
}
.theme-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.theme-slider {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: 50px;
  cursor: pointer;
  transition: background 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5px;
}
.theme-slider::before {
  content: '';
  position: absolute;
  left: 3px;
  width: 22px; height: 22px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  z-index: 2;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.theme-toggle input:checked + .theme-slider {
  background: #6366f1;
}
.theme-toggle input:checked + .theme-slider::before {
  transform: translateX(24px);
  box-shadow: 0 1px 8px rgba(99,102,241,0.5);
}
.theme-icon {
  font-size: 11px;
  z-index: 1;
  line-height: 1;
  user-select: none;
  pointer-events: none;
}
.theme-icon-moon { margin-left: auto; }
.nav-theme-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}
