/* ═══════════════════════════════════════════════════════════════
   SAMSARA SYSTEMS — PORTFOLIO STYLESHEET
   portfolio.samsarasystems.com
   ═══════════════════════════════════════════════════════════════ */

/* ─── CSS VARIABLES ─────────────────────────────────────────── */
:root {
  /* Brand Colors */
  --primary:        #3B5BDB;   /* Samsara blue */
  --primary-dark:   #2f4abf;
  --primary-light:  #dde4ff;
  --primary-faint:  #eef1ff;

  /* Neutrals */
  --bg:             #ffffff;
  --bg-subtle:      #f8f9ff;
  --bg-muted:       #f2f4f8;
  --surface:        #f8f9ff;
  --border:         #e4e8f0;
  --border-strong:  #cdd3e0;

  /* Text */
  --text-primary:   #0f1523;
  --text-secondary: #4a5568;
  --text-muted:     #718096;
  --text-faint:     #a0aec0;

  /* Accents */
  --black:          #000000;
  --white:          #ffffff;

  /* Spacing */
  --radius-sm:      0.5rem;
  --radius:         0.875rem;
  --radius-lg:      1.25rem;
  --radius-xl:      1.75rem;
  --radius-full:    9999px;

  /* Shadows */
  --shadow-sm:      0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow:         0 4px 16px rgba(0,0,0,.08), 0 2px 6px rgba(0,0,0,.04);
  --shadow-md:      0 8px 32px rgba(0,0,0,.10), 0 4px 12px rgba(0,0,0,.06);
  --shadow-lg:      0 20px 60px rgba(0,0,0,.12), 0 8px 24px rgba(0,0,0,.08);

  /* Transitions */
  --transition:     all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

body {
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  background-color: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

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

ul { list-style: none; }

/* ─── CONTAINER ─────────────────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ─── NAVIGATION ─────────────────────────────────────────────── */
.nav-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: var(--transition);
}

.nav-header.scrolled {
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 68px;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-primary);
  flex-shrink: 0;
}

.logo-icon {
  color: var(--primary);
  font-size: 1.3rem;
  line-height: 1;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
}

.nav-links a {
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
}

.nav-links a:hover {
  color: var(--text-primary);
  background: var(--bg-muted);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.25rem;
  background: var(--black);
  color: var(--white);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
  white-space: nowrap;
}

.btn-primary:hover {
  background: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(59, 91, 219, 0.35);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  margin-left: auto;
}

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

/* ─── HERO ───────────────────────────────────────────────────── */
.hero {
  position: relative;
  padding: 9rem 0 5rem;
  overflow: hidden;
  background: linear-gradient(160deg, #f0f4ff 0%, #ffffff 50%, #f8f9ff 100%);
}

.hero-bg-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
}

.shape-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #c7d4ff 0%, transparent 70%);
  top: -200px;
  right: -100px;
}

.shape-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #dde4ff 0%, transparent 70%);
  bottom: -100px;
  left: -100px;
}

.shape-3 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, #e8edff 0%, transparent 70%);
  top: 50%;
  left: 40%;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2); }
  50%       { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.1); }
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
}

.text-accent {
  color: var(--primary);
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 560px;
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.stat-number {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.stat-divider {
  width: 1px;
  height: 36px;
  background: var(--border);
}

/* ─── FILTER BAR ─────────────────────────────────────────────── */
.filter-section {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
  background: var(--white);
  position: sticky;
  top: 68px;
  z-index: 50;
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: transparent;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.filter-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-faint);
}

.filter-btn.active {
  background: var(--black);
  border-color: var(--black);
  color: var(--white);
}

/* ─── SECTION LABELS & HEADERS ───────────────────────────────── */
.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.section-label.light {
  color: var(--primary-light);
}

.section-header {
  margin-bottom: 3rem;
}

.section-header.centered {
  text-align: center;
}

.section-title {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  margin-bottom: 0.875rem;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 520px;
  line-height: 1.7;
}

/* ─── FEATURED SECTION ───────────────────────────────────────── */
.featured-section {
  padding: 5rem 0 3rem;
}

.featured-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  padding: 2.5rem;
  transition: var(--transition-slow);
}

.featured-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.featured-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/3;
}

.featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-placeholder {
  height: 100%;
  min-height: 280px;
}

.featured-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.featured-title {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.featured-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.75;
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.tech-stack li {
  padding: 0.3rem 0.75rem;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.featured-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  padding: 0.6rem 1.25rem;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  background: transparent;
  cursor: pointer;
  transition: var(--transition);
}

.btn-ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-faint);
}

/* ─── PROJECT TAGS ───────────────────────────────────────────── */
.project-tag {
  display: inline-block;
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tag-app      { background: #dde4ff; color: #3B5BDB; }
.tag-web      { background: #d3f9d8; color: #2f9e44; }
.tag-branding { background: #ffe8cc; color: #e67700; }
.tag-saas     { background: #f3d9fa; color: #862e9c; }

/* ─── PROJECTS GRID ──────────────────────────────────────────── */
.projects-section {
  padding: 3rem 0 5rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.project-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition-slow);
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
  border-color: var(--border-strong);
}

.card-image {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--bg-muted);
}

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

.project-card:hover .card-image img {
  transform: scale(1.04);
}

.card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 21, 35, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
}

.project-card:hover .card-overlay {
  opacity: 1;
}

.overlay-btn {
  padding: 0.6rem 1.25rem;
  background: var(--white);
  color: var(--text-primary);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  transition: var(--transition);
}

.overlay-btn:hover {
  background: var(--primary);
  color: var(--white);
}

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

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
}

.card-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.65;
  flex: 1;
}

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

.card-tech {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.card-tech span {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-muted);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
}

.card-link {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  white-space: nowrap;
  transition: var(--transition);
}

.card-link:hover {
  color: var(--primary-dark);
}

/* ─── IMAGE PLACEHOLDERS ─────────────────────────────────────── */
.img-placeholder {
  width: 100%;
  height: 100%;
  min-height: 180px;
  background: linear-gradient(135deg, var(--bg-muted) 0%, var(--primary-faint) 100%);
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  text-align: center;
  padding: 1.5rem;
}

.placeholder-icon {
  font-size: 2.5rem;
  opacity: 0.6;
}

.placeholder-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.placeholder-hint code {
  display: block;
  font-family: ui-monospace, monospace;
  font-size: 0.7rem;
  color: var(--primary);
  background: var(--primary-faint);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  margin-top: 0.3rem;
}

/* ─── PROCESS SECTION ────────────────────────────────────────── */
.process-section {
  padding: 5rem 0;
  background: var(--bg-subtle);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

.process-step {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.step-number {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--primary-light);
  line-height: 1;
  letter-spacing: -0.04em;
}

.process-step h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.process-step p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ─── CTA SECTION ────────────────────────────────────────────── */
.cta-section {
  padding: 5rem 0;
}

.cta-card {
  background: var(--black);
  border-radius: var(--radius-xl);
  padding: 4rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: center;
  overflow: hidden;
  position: relative;
}

.cta-content {
  position: relative;
  z-index: 1;
}

.cta-title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--white);
  margin-bottom: 1rem;
}

.text-accent-light {
  color: #748ffc;
}

.cta-desc {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.7;
  max-width: 480px;
  margin-bottom: 2rem;
}

.cta-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-primary-lg {
  display: inline-flex;
  align-items: center;
  padding: 0.875rem 1.75rem;
  background: var(--white);
  color: var(--black);
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 700;
  transition: var(--transition);
}

.btn-primary-lg:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(59, 91, 219, 0.4);
}

.btn-ghost-light {
  display: inline-flex;
  align-items: center;
  padding: 0.875rem 1.5rem;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
  transition: var(--transition);
}

.btn-ghost-light:hover {
  border-color: rgba(255, 255, 255, 0.5);
  color: var(--white);
}

.cta-visual {
  position: relative;
  width: 200px;
  height: 200px;
  flex-shrink: 0;
}

.cta-orb {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #748ffc, #3B5BDB 50%, #1a2a8a);
  box-shadow: 0 0 80px rgba(116, 143, 252, 0.4);
  animation: orb-float 6s ease-in-out infinite;
}

@keyframes orb-float {
  0%, 100% { transform: translateY(0) scale(1); }
  50%       { transform: translateY(-12px) scale(1.03); }
}

/* ─── FOOTER ─────────────────────────────────────────────────── */
.site-footer {
  background: var(--bg-subtle);
  border-top: 1px solid var(--border);
  padding: 3.5rem 0 2rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

.footer-tagline {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
  max-width: 220px;
  line-height: 1.6;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-col h4 {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

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

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

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

.footer-bottom p {
  font-size: 0.8rem;
  color: var(--text-faint);
}

/* ─── HIDDEN (for filter) ────────────────────────────────────── */
.project-card.hidden {
  display: none;
}

/* ─── ANIMATIONS ─────────────────────────────────────────────── */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-up {
  animation: fade-up 0.6s ease forwards;
}

.fade-up-delay-1 { animation-delay: 0.1s; opacity: 0; }
.fade-up-delay-2 { animation-delay: 0.2s; opacity: 0; }
.fade-up-delay-3 { animation-delay: 0.3s; opacity: 0; }

/* ─── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .process-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .featured-card {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1rem 1.5rem;
    gap: 0.25rem;
    box-shadow: var(--shadow-md);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 0.75rem 1rem;
    width: 100%;
  }

  .nav-toggle {
    display: flex;
  }

  .btn-primary {
    display: none;
  }

  .hero {
    padding: 7rem 0 4rem;
  }

  .hero-stats {
    gap: 1.25rem;
  }

  .stat-divider {
    display: none;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .process-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .cta-card {
    grid-template-columns: 1fr;
    padding: 2.5rem 2rem;
  }

  .cta-visual {
    display: none;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-links {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .filter-bar {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.25rem;
    -webkit-overflow-scrolling: touch;
  }

  .filter-btn {
    flex-shrink: 0;
  }
}

@media (max-width: 480px) {
  .footer-links {
    grid-template-columns: 1fr;
  }

  .featured-card {
    padding: 1.5rem;
  }

  .cta-card {
    padding: 2rem 1.5rem;
  }
}
