/* ==========================================
   CSS VARIABLES & DESIGN SYSTEM (Clean White)
   ========================================== */
:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-card: rgba(255, 255, 255, 0.85);
  
  --border-light: #e2e8f0;
  --border-hover: #cbd5e1;
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  
  --accent-blue: #007aff;
  --accent-blue-hover: #0056b3;
  --accent-blue-light: rgba(0, 122, 255, 0.08);
  
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.03), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
  --shadow-lg: 0 20px 25px -5px rgba(15, 23, 42, 0.05), 0 10px 10px -5px rgba(15, 23, 42, 0.02);
  --shadow-glow: 0 0 30px rgba(0, 122, 255, 0.15);
  
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

body {
  overflow-x: hidden;
  line-height: 1.6;
}

/* ==========================================
   AMBIENT BACKGROUND LIGHTING
   ========================================== */
.ambient-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
  background: var(--bg-primary);
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.5;
  animation: float 16s infinite alternate ease-in-out;
}

.blob-1 {
  width: 500px;
  height: 500px;
  background: rgba(56, 189, 248, 0.18);
  top: -15%;
  left: -10%;
}

.blob-2 {
  width: 550px;
  height: 550px;
  background: rgba(129, 140, 248, 0.15);
  bottom: -20%;
  right: -10%;
  animation-delay: -6s;
}

.blob-3 {
  width: 350px;
  height: 350px;
  background: rgba(167, 139, 250, 0.12);
  top: 40%;
  left: 60%;
  animation-delay: -10s;
}

@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, 30px) scale(1.05); }
  100% { transform: translate(-30px, 20px) scale(0.95); }
}

/* ==========================================
   NAVIGATION
   ========================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1.25rem 2rem;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.6);
  transition: all 0.3s ease;
}

.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--text-main);
}

.logo-dot {
  color: var(--accent-blue);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--accent-blue);
}

.nav-btn {
  background: var(--accent-blue-light);
  color: var(--accent-blue) !important;
  padding: 0.5rem 1.2rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(0, 122, 255, 0.2);
}

/* ==========================================
   HERO SECTION
   ========================================== */
.hero {
  padding: 10rem 1.5rem 6rem;
  text-align: center;
}

.hero-container {
  max-width: 800px;
  margin: 0 auto;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: var(--accent-blue-light);
  border: 1px solid rgba(0, 122, 255, 0.2);
  border-radius: var(--radius-pill);
  color: var(--accent-blue);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.badge-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-blue);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-blue);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 1.25rem;
}

.text-gradient {
  background: linear-gradient(135deg, #007aff 0%, #0056b3 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 2.5rem;
  font-weight: 400;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.8rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-primary {
  background: var(--accent-blue);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(0, 122, 255, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 122, 255, 0.35);
}

.btn-secondary {
  background: var(--bg-primary);
  color: var(--text-main);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

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

/* ==========================================
   PROJECTS SECTION
   ========================================== */
.section {
  padding: 6rem 1.5rem;
}

.bg-glass {
  background: var(--bg-secondary);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.card-badge {
  align-self: flex-start;
  padding: 0.25rem 0.75rem;
  background: var(--accent-blue-light);
  color: var(--accent-blue);
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.25rem;
}

.card-header h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.tech-tag {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-light);
  display: block;
  margin-bottom: 1rem;
}

.card-text {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
}

.card-features {
  list-style: none;
  margin-bottom: 2rem;
  flex: 1;
}

.card-features li {
  font-size: 0.88rem;
  color: var(--text-main);
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-features li::before {
  content: "✓";
  color: var(--accent-blue);
  font-weight: 800;
}

.card-footer {
  display: flex;
  gap: 0.75rem;
}

.card-link {
  padding: 0.65rem 1.2rem;
  border-radius: var(--radius-pill);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-live {
  background: var(--accent-blue);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-live:hover {
  background: var(--accent-blue-hover);
}

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

.btn-repo:hover {
  border-color: var(--border-hover);
  color: var(--text-main);
}

/* ==========================================
   SKILLS SECTION
   ========================================== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.skill-category {
  background: var(--bg-primary);
  padding: 1.8rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.skill-category h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--accent-blue);
}

.skill-category p {
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* ==========================================
   FOOTER
   ========================================== */
.footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--border-light);
  padding: 4rem 1.5rem 2rem;
}

.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3rem;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-brand h3 {
  font-size: 1.3rem;
  font-weight: 800;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--accent-blue);
}

.footer-bottom {
  text-align: center;
  color: var(--text-light);
  font-size: 0.85rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-light);
}

/* Scroll Animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

@media (max-width: 768px) {
  .hero-title { font-size: 2.5rem; }
  .nav-links { display: none; }
}