/* ==========================================================================
   Creative Portfolio Hub - Design System
   Modern Glassmorphism, Dynamic Gradients, FTP-Ready Relative Architecture
   ========================================================================== */

:root {
  --bg-primary: #0a0e17;
  --bg-secondary: #111827;
  --bg-card: rgba(22, 30, 49, 0.75);
  --bg-card-hover: rgba(30, 41, 69, 0.9);
  --border-card: rgba(255, 255, 255, 0.1);
  --border-card-hover: rgba(99, 102, 241, 0.6);
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-accent: #38bdf8;
  
  --primary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
  --secondary-gradient: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
  --accent-gold: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  --glow-color: rgba(99, 102, 241, 0.35);
  
  --font-heading: 'Prompt', 'Outfit', sans-serif;
  --font-body: 'Prompt', 'Plus Jakarta Sans', sans-serif;
  
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 25px -3px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 20px 40px -5px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.25);
  
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Light Theme Variables */
[data-theme="light"] {
  --bg-primary: #f1f5f9;
  --bg-secondary: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-hover: rgba(255, 255, 255, 0.98);
  --border-card: rgba(0, 0, 0, 0.08);
  --border-card-hover: rgba(99, 102, 241, 0.5);
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-accent: #0284c7;
  --shadow-glow: 0 0 25px rgba(99, 102, 241, 0.15);
}

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

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* Ambient Canvas & Glow Orbs */
#ambient-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

.ambient-glow {
  position: fixed;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.18;
  animation: pulse-glow 12s ease-in-out infinite alternate;
}

.glow-1 {
  top: -10%;
  left: 10%;
  background: radial-gradient(circle, #6366f1, #a855f7);
}

.glow-2 {
  bottom: 10%;
  right: 5%;
  background: radial-gradient(circle, #ec4899, #f59e0b);
  animation-delay: -6s;
}

.glow-3 {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, #06b6d4, #3b82f6);
  opacity: 0.12;
}

@keyframes pulse-glow {
  0% { transform: scale(1) translate(0, 0); opacity: 0.15; }
  50% { transform: scale(1.15) translate(30px, -20px); opacity: 0.25; }
  100% { transform: scale(0.9) translate(-20px, 30px); opacity: 0.15; }
}

/* Container */
.container {
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(10, 14, 23, 0.7);
  border-bottom: 1px solid var(--border-card);
  transition: all var(--transition-normal);
}

[data-theme="light"] .navbar {
  background: rgba(255, 255, 255, 0.75);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  max-width: 1360px;
  margin: 0 auto;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-main);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
}

.logo-badge {
  background: var(--primary-gradient);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 4px 15px rgba(168, 85, 247, 0.4);
}

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

.nav-link {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-link:hover {
  color: var(--text-accent);
}

.theme-toggle-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  color: var(--text-main);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all var(--transition-fast);
}

.theme-toggle-btn:hover {
  border-color: var(--text-accent);
  transform: rotate(20deg);
}

/* Hero Section */
.hero-section {
  padding: 4.5rem 0 3rem;
  text-align: center;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1.1rem;
  border-radius: var(--radius-full);
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #a5b4fc;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(8px);
}

.hero-pill .pulse-dot {
  width: 8px;
  height: 8px;
  background-color: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 10px #22c55e;
  animation: blink 2s infinite;
}

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

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

.text-gradient {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-muted);
  max-width: 780px;
  margin: 0 auto 2.5rem;
  font-weight: 400;
}

/* Quick Stats Bar */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.25rem;
  margin-bottom: 3.5rem;
}

.stat-item {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  text-align: center;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.stat-item:hover {
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.4);
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  font-family: var(--font-heading);
  background: var(--secondary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Section Header */
.section-header {
  margin-bottom: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 1rem;
}

.section-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.section-tag {
  color: var(--text-accent);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--text-main);
}

/* Filter and Search Controls */
.controls-wrap {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}

.search-box {
  position: relative;
  width: 100%;
}

.search-input {
  width: 100%;
  padding: 0.9rem 1.25rem 0.9rem 3rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-full);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 1rem;
  outline: none;
  transition: all var(--transition-fast);
}

[data-theme="light"] .search-input {
  background: #f8fafc;
}

.search-input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

.search-icon {
  position: absolute;
  left: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.1rem;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.filter-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-card);
  color: var(--text-muted);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.filter-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.2);
}

.filter-btn.active {
  background: var(--primary-gradient);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(168, 85, 247, 0.35);
  font-weight: 600;
}

/* Project Folders Cards Grid */
.folder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1.75rem;
  margin-bottom: 4.5rem;
}

.folder-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform var(--transition-bounce), box-shadow var(--transition-normal), border-color var(--transition-normal);
  text-decoration: none;
  color: inherit;
}

.folder-card:hover {
  transform: translateY(-8px);
  border-color: var(--border-card-hover);
  box-shadow: var(--shadow-glow), var(--shadow-lg);
}

.card-banner {
  height: 200px;
  position: relative;
  overflow: hidden;
  background: #1e293b;
}

.card-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.folder-card:hover .card-banner img {
  transform: scale(1.08);
}

.card-badge-top {
  position: absolute;
  top: 1rem;
  left: 1rem;
  padding: 0.35rem 0.8rem;
  background: rgba(10, 14, 23, 0.75);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.card-link-icon {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  background: rgba(10, 14, 23, 0.75);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.9rem;
  transition: transform var(--transition-fast), background-color var(--transition-fast);
}

.folder-card:hover .card-link-icon {
  background: #6366f1;
  transform: scale(1.1) rotate(45deg);
}

.card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.folder-path-label {
  font-size: 0.75rem;
  font-family: monospace;
  color: var(--text-accent);
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  color: var(--text-main);
}

.card-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.tag-chip {
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid var(--border-card);
}

.btn-open {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-full);
  background: var(--primary-gradient);
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
  border: none;
  cursor: pointer;
}

.btn-open:hover {
  opacity: 0.92;
  transform: translateX(3px);
}

.btn-preview {
  background: transparent;
  border: 1px solid var(--border-card);
  color: var(--text-muted);
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

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

/* Theme Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.75rem;
  margin-bottom: 4.5rem;
}

.gallery-card {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.gallery-card:hover {
  transform: translateY(-6px);
  border-color: rgba(168, 85, 247, 0.5);
  box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.6);
}

.gallery-thumb {
  position: relative;
  height: 220px;
  overflow: hidden;
  cursor: pointer;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-thumb:hover img {
  transform: scale(1.06);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 14, 23, 0.9) 0%, rgba(10, 14, 23, 0.2) 60%, transparent 100%);
  display: flex;
  align-items: flex-end;
  padding: 1.25rem;
  opacity: 0.9;
}

.gallery-theme-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
}

.gallery-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
}

.gallery-content {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.gallery-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.5;
}

/* FTP / Server Hosting Readiness Banner */
.ftp-ready-banner {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.9));
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  margin-bottom: 4rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
}

.ftp-ready-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 6px;
  height: 100%;
  background: #22c55e;
}

.ftp-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.ftp-icon {
  width: 44px;
  height: 44px;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.4);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #22c55e;
  font-size: 1.4rem;
}

.ftp-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: #22c55e;
}

.ftp-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
  list-style: none;
}

.ftp-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.ftp-item-check {
  color: #22c55e;
  font-weight: bold;
}

/* Modal Lightbox */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-normal), visibility var(--transition-normal);
}

.modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  max-width: 850px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: scale(0.95);
  transition: transform var(--transition-bounce);
  box-shadow: var(--shadow-lg);
}

.modal.active .modal-content {
  transform: scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: background var(--transition-fast);
}

.modal-close-btn:hover {
  background: #ef4444;
}

.modal-img-wrap {
  width: 100%;
  height: 400px;
  background: #000;
}

.modal-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-body {
  padding: 2rem;
}

.modal-theme-tag {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-full);
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.modal-desc {
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1.75rem;
}

.modal-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border-card);
  padding: 3rem 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  background: rgba(10, 14, 23, 0.85);
  backdrop-filter: blur(10px);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.25rem;
}

.footer-link {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: var(--text-accent);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero-section {
    padding: 3rem 0 2rem;
  }
  .modal-img-wrap {
    height: 240px;
  }
  .modal-body {
    padding: 1.25rem;
  }
  .stats-bar {
    grid-template-columns: 1fr 1fr;
  }
}
