/* ============================================================
   GLOBAL STYLES — Portfolio Design System
   ============================================================ */

/* Google Fonts fallback */
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── CSS Variables ── */
:root {
  --primary: #7c3aed;
  --primary-light: #a78bfa;
  --accent: #06b6d4;
  --accent2: #e879f9;
  --gradient: linear-gradient(135deg, #7c3aed, #06b6d4);
  --gradient2: linear-gradient(135deg, #e879f9, #7c3aed);

  /* Dark theme (default) */
  --bg: #0f172a;
  --bg2: #1e293b;
  --bg3: #0d1424;
  --surface: rgba(30, 41, 59, 0.8);
  --surface2: rgba(15, 23, 42, 0.6);
  --border: rgba(124, 58, 237, 0.2);
  --border2: rgba(255,255,255,0.08);
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --text-faint: #475569;
  --card-bg: rgba(30, 41, 59, 0.7);
  --shadow: 0 20px 60px rgba(0,0,0,0.4);
  --glow: 0 0 30px rgba(124,58,237,0.3);

  /* Typography */
  --font-heading: 'Sora', sans-serif;
  --font-body: 'Sora', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Spacing */
  --sp1: 8px; --sp2: 16px; --sp3: 24px; --sp4: 32px;
  --sp5: 40px; --sp6: 48px; --sp8: 64px; --sp10: 80px;

  /* Radii */
  --r-sm: 8px; --r-md: 12px; --r-lg: 20px; --r-xl: 32px;

  /* Transitions */
  --t-fast: 0.15s ease;
  --t-med: 0.3s cubic-bezier(0.4,0,0.2,1);
  --t-slow: 0.6s cubic-bezier(0.4,0,0.2,1);
}

[data-theme="light"] {
  --bg: #ffffff;
  --bg2: #f1f5f9;
  --bg3: #e2e8f0;
  --surface: rgba(255,255,255,0.9);
  --surface2: rgba(241,245,249,0.8);
  --border: rgba(124,58,237,0.2);
  --border2: rgba(0,0,0,0.08);
  --text: #0f172a;
  --text-muted: #475569;
  --text-faint: #94a3b8;
  --card-bg: rgba(255,255,255,0.85);
  --shadow: 0 20px 60px rgba(0,0,0,0.12);
  --glow: 0 0 30px rgba(124,58,237,0.15);
}

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

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

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

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ── Custom Cursor ── */
.cursor-dot, .cursor-outline {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s;
}
.cursor-dot {
  width: 6px; height: 6px;
  background: var(--accent);
  top: 0; left: 0;
}
.cursor-outline {
  width: 32px; height: 32px;
  border: 1.5px solid rgba(6,182,212,0.5);
  top: 0; left: 0;
  transition: width 0.2s, height 0.2s, border-color 0.2s;
}
body:not(:hover) .cursor-dot,
body:not(:hover) .cursor-outline { opacity: 0; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 10px; }

/* ── Container ── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--sp3);
}

/* ── Utility ── */
.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.gradient-text2 {
  background: var(--gradient2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glass-card {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border2);
  border-radius: var(--r-lg);
  transition: transform var(--t-med), box-shadow var(--t-med), border-color var(--t-med);
}
.glass-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow), var(--glow);
  border-color: var(--border);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 50px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  transition: all var(--t-med);
  position: relative;
  overflow: hidden;
}
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.1);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-med);
}
.btn:hover::before { transform: scaleX(1); }

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 8px 32px rgba(124,58,237,0.4);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(124,58,237,0.5);
}

.btn-outline {
  border: 1.5px solid var(--primary);
  color: var(--primary-light);
  background: transparent;
}
.btn-outline:hover {
  background: rgba(124,58,237,0.1);
  transform: translateY(-2px);
}

.btn-ghost {
  border: 1.5px solid var(--border2);
  color: var(--text-muted);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* ── Tags ── */
.tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: rgba(124,58,237,0.15);
  color: var(--primary-light);
  border: 1px solid rgba(124,58,237,0.3);
}

/* ── Section Styles ── */
section { padding: var(--sp10) 0; }

.section-header {
  text-align: center;
  margin-bottom: var(--sp8);
}
.section-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 4px 14px;
  border-radius: 20px;
  border: 1px solid rgba(6,182,212,0.3);
  background: rgba(6,182,212,0.08);
  margin-bottom: var(--sp2);
}
.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  margin-bottom: var(--sp2);
  line-height: 1.2;
}
.section-sub {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 500px;
  margin: 0 auto;
}

/* ── Section CTA ── */
.section-cta {
  text-align: center;
  margin-top: var(--sp6);
}

/* ── Navbar ── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: all var(--t-med);
}
.navbar.scrolled {
  background: var(--surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border2);
  padding: 10px 0;
  box-shadow: 0 4px 30px rgba(0,0,0,0.2);
}
.nav-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 var(--sp3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp3);
}
.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
}
.logo-bracket { color: var(--primary-light); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-link {
  padding: 6px 12px;
  border-radius: var(--r-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all var(--t-fast);
}
.nav-link:hover,
.nav-link.active {
  color: var(--text);
  background: rgba(124,58,237,0.12);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--sp2);
}
.theme-toggle, .cmd-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border2);
  color: var(--text-muted);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--t-fast);
}
.theme-toggle:hover, .cmd-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(6,182,212,0.1);
}

.hire-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 20px;
  background: rgba(16,185,129,0.12);
  border: 1px solid rgba(16,185,129,0.3);
  font-size: 0.78rem;
  font-weight: 600;
  color: #10b981;
  white-space: nowrap;
}
.hire-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #10b981;
  animation: pulse-green 2s infinite;
}
@keyframes pulse-green {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16,185,129,0.4); }
  50% { box-shadow: 0 0 0 6px rgba(16,185,129,0); }
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 4px;
  transition: all var(--t-fast);
}

/* ── Sidebar (Mobile) ── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 1100;
  backdrop-filter: blur(4px);
}
.sidebar-overlay.active { display: block; }

.sidebar {
  position: fixed;
  top: 0; left: -280px;
  width: 280px; height: 100%;
  background: var(--bg2);
  z-index: 1200;
  padding: var(--sp6) var(--sp4);
  border-right: 1px solid var(--border2);
  transition: left var(--t-med);
}
.sidebar.active { left: 0; }
.sidebar-close {
  position: absolute;
  top: var(--sp3); right: var(--sp3);
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border2);
}
.sidebar-links { margin-top: var(--sp8); display: flex; flex-direction: column; gap: var(--sp2); }
.sidebar-links a {
  display: flex;
  align-items: center;
  gap: var(--sp2);
  padding: 10px 16px;
  border-radius: var(--r-md);
  color: var(--text-muted);
  font-weight: 500;
  transition: all var(--t-fast);
}
.sidebar-links a:hover {
  background: rgba(124,58,237,0.12);
  color: var(--text);
}
.sidebar-links i { width: 18px; color: var(--primary-light); }

/* ── Command Palette ── */
.cmd-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  z-index: 2000;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
}
.cmd-overlay.active { display: flex; }
.cmd-palette {
  width: 560px;
  max-width: 94vw;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: 0 40px 80px rgba(0,0,0,0.5), var(--glow);
  animation: cmdSlideIn 0.2s ease;
}
@keyframes cmdSlideIn {
  from { opacity: 0; transform: translateY(-20px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.cmd-header {
  display: flex;
  align-items: center;
  gap: var(--sp2);
  padding: 16px 20px;
  border-bottom: 1px solid var(--border2);
}
.cmd-header i { color: var(--text-faint); }
.cmd-header input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--text);
}
.cmd-header kbd {
  padding: 2px 8px;
  border-radius: 5px;
  background: var(--surface);
  border: 1px solid var(--border2);
  font-size: 0.7rem;
  color: var(--text-faint);
  font-family: var(--font-mono);
}
.cmd-results { max-height: 320px; overflow-y: auto; }
.cmd-item {
  display: flex;
  align-items: center;
  gap: var(--sp2);
  padding: 12px 20px;
  cursor: pointer;
  transition: background var(--t-fast);
  font-size: 0.9rem;
  color: var(--text-muted);
}
.cmd-item:hover, .cmd-item.active {
  background: rgba(124,58,237,0.12);
  color: var(--text);
}
.cmd-item i { width: 18px; color: var(--primary-light); }

/* ── Footer ── */
.footer {
  background: var(--bg3);
  border-top: 1px solid var(--border2);
  padding: var(--sp8) 0 var(--sp4);
}
.footer-top {
  display: flex;
  justify-content: space-between;
  gap: var(--sp8);
  margin-bottom: var(--sp6);
  flex-wrap: wrap;
}
.footer-brand p { color: var(--text-muted); margin-top: var(--sp2); font-size: 0.9rem; }
.footer-links-grid {
  display: flex;
  gap: var(--sp8);
  flex-wrap: wrap;
}
.footer-links-grid div {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-links-grid h4 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  margin-bottom: 4px;
}
.footer-links-grid a {
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: color var(--t-fast);
}
.footer-links-grid a:hover { color: var(--primary-light); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border2);
  padding-top: var(--sp3);
  flex-wrap: wrap;
  gap: var(--sp2);
}
.footer-bottom p { color: var(--text-faint); font-size: 0.85rem; }
.footer-socials { display: flex; gap: var(--sp2); }
.footer-socials a {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border2);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: all var(--t-fast);
}
.footer-socials a:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  transform: translateY(-2px);
}

/* ── Page Hero (inner pages) ── */
.page-hero {
  padding: 160px 0 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 0%, rgba(124,58,237,0.2) 0%, transparent 70%);
}
.page-hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  margin-bottom: var(--sp2);
  position: relative;
}
.page-hero p {
  color: var(--text-muted);
  font-size: 1.1rem;
  position: relative;
}

/* ── Skeleton Loader ── */
.skeleton {
  background: linear-gradient(90deg, var(--bg2) 25%, var(--bg3) 50%, var(--bg2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--r-sm);
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .nav-links { display: none; }
  .hire-badge { display: none; }
  .hamburger { display: flex; }
}
@media (max-width: 768px) {
  section { padding: var(--sp8) 0; }
  .cmd-btn { display: none; }
}
