/* ==========================================================================
   ARevo Team — Portfolio Design System & Stylesheet
   ========================================================================== */

/* --- Custom Properties / Design Tokens --- */
:root {
  /* Color Palette */
  --bg-dark: #07090e;
  --bg-card: rgba(15, 23, 42, 0.65);
  --bg-card-hover: rgba(30, 41, 59, 0.75);
  --bg-card-border: rgba(255, 255, 255, 0.08);
  --bg-card-border-hover: rgba(56, 189, 248, 0.35);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  /* Accents & Brand Gradients */
  --accent-cyan: #06b6d4;
  --accent-blue: #3b82f6;
  --accent-indigo: #6366f1;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-purple: #a855f7;

  --gradient-brand: linear-gradient(135deg, #06b6d4 0%, #3b82f6 50%, #8b5cf6 100%);
  --gradient-glow: radial-gradient(circle at 50% 0%, rgba(56, 189, 248, 0.15), transparent 70%);
  --gradient-emerald: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --gradient-cyan: linear-gradient(135deg, #06b6d4 0%, #0284c7 100%);
  --gradient-indigo: linear-gradient(135deg, #6366f1 0%, #4338ca 100%);

  /* Typography */
  --font-display: 'Syne', system-ui, -apple-system, sans-serif;
  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Shadows & Glows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--bg-card-border);
  --shadow-card-hover: 0 20px 40px -15px rgba(2, 132, 199, 0.2), 0 0 0 1px var(--bg-card-border-hover);
  --glow-cyan: 0 0 25px rgba(6, 182, 212, 0.3);
  --glow-emerald: 0 0 25px rgba(16, 185, 129, 0.3);

  /* Layout */
  --container-width: 1200px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Light Theme Variables */
[data-theme="light"] {
  --bg-dark: #f8fafc;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-hover: rgba(255, 255, 255, 0.98);
  --bg-card-border: rgba(15, 23, 42, 0.08);
  --bg-card-border-hover: rgba(2, 132, 199, 0.35);

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #94a3b8;

  --shadow-card: 0 10px 30px -10px rgba(15, 23, 42, 0.08), 0 0 0 1px var(--bg-card-border);
  --shadow-card-hover: 0 20px 40px -15px rgba(2, 132, 199, 0.15), 0 0 0 1px var(--bg-card-border-hover);
}

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

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

[data-theme="light"] html {
  color-scheme: light;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* Background Atmospheric Canvas & Glows */
.bg-ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bg-ambient-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.15;
  will-change: transform;
  animation: floatOrb 20s infinite alternate ease-in-out;
}

.blob-1 {
  width: 500px;
  height: 500px;
  background: var(--accent-cyan);
  top: -100px;
  left: 10%;
}

.blob-2 {
  width: 450px;
  height: 450px;
  background: var(--accent-indigo);
  top: 40%;
  right: -50px;
  animation-duration: 25s;
  animation-delay: -5s;
}

.blob-3 {
  width: 400px;
  height: 400px;
  background: var(--accent-emerald);
  bottom: 5%;
  left: 20%;
  animation-duration: 18s;
  animation-delay: -10s;
}

.bg-grid-overlay {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  mask-image: radial-gradient(ellipse at 50% 20%, black 40%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 20%, black 40%, transparent 80%);
}

[data-theme="light"] .bg-grid-overlay {
  background-image: 
    linear-gradient(to right, rgba(15, 23, 42, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15, 23, 42, 0.04) 1px, transparent 1px);
}

@keyframes floatOrb {
  0% { transform: translateY(0px) scale(1); }
  50% { transform: translateY(60px) translateX(30px) scale(1.08); }
  100% { transform: translateY(-40px) translateX(-20px) scale(0.95); }
}

/* --- Container & Utilities --- */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin-inline: auto;
  padding-inline: 1.5rem;
  position: relative;
  z-index: 1;
}

/* Typography styles */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.gradient-text {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

p {
  color: var(--text-muted);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

/* --- Navigation Header --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 1.25rem 0;
  transition: all var(--transition-normal);
}

.site-header.scrolled {
  padding: 0.75rem 0;
  background: rgba(7, 9, 14, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--bg-card-border);
}

[data-theme="light"] .site-header.scrolled {
  background: rgba(248, 250, 252, 0.85);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-main);
}

.brand-icon-box {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(59, 130, 246, 0.2));
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.2);
}

.brand-logo span.dot {
  color: var(--accent-cyan);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-link {
  font-size: 0.925rem;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  padding: 0.35rem 0;
}

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

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--accent-cyan);
  transition: width var(--transition-fast);
  border-radius: 2px;
}

.nav-link:hover::after {
  width: 100%;
}

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

.theme-toggle-btn {
  background: transparent;
  border: 1px solid var(--bg-card-border);
  color: var(--text-muted);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.theme-toggle-btn:hover {
  color: var(--text-main);
  border-color: var(--bg-card-border-hover);
  background: var(--bg-card);
}

.mobile-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--bg-card-border);
  color: var(--text-main);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-normal);
  border: none;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--gradient-brand);
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(6, 182, 212, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(6, 182, 212, 0.4);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-main);
  border: 1px solid var(--bg-card-border);
}

.btn-outline:hover {
  border-color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.08);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

/* Status live pill badge */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-emerald);
  position: relative;
}

.pulse-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2px solid var(--accent-emerald);
  opacity: 0.7;
  animation: pulsePing 2s infinite cubic-bezier(0, 0, 0.2, 1);
}

@keyframes pulsePing {
  0% { transform: scale(0.9); opacity: 0.8; }
  100% { transform: scale(2.4); opacity: 0; }
}

/* --- Hero Section --- */
.hero-section {
  padding-top: 10rem;
  padding-bottom: 5rem;
  position: relative;
  text-align: center;
}

.hero-pill-wrapper {
  margin-bottom: 1.75rem;
  display: flex;
  justify-content: center;
}

.hero-title {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  font-size: clamp(2.2rem, 4.2vw, 3.8rem);
  font-weight: 800;
  max-width: 900px;
  margin-inline: auto;
  margin-bottom: 1.5rem;
  line-height: 1.16;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.nowrap {
  white-space: nowrap;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: var(--text-muted);
  max-width: 740px;
  margin-inline: auto;
  margin-bottom: 2.75rem;
  line-height: 1.6;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 4rem;
}

/* Live Terminal / System Status Bar in Hero */
.system-status-bar {
  max-width: 860px;
  margin-inline: auto;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-card);
  flex-wrap: wrap;
  gap: 1rem;
}

.status-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.825rem;
  color: var(--text-muted);
}

.status-items {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.status-item .dot-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-emerald);
}

.status-item strong {
  color: var(--text-main);
  font-weight: 600;
}

.status-item .ping-time {
  color: var(--accent-cyan);
  font-size: 0.75rem;
}

/* --- Section Headers --- */
.section-header {
  text-align: center;
  max-width: 680px;
  margin-inline: auto;
  margin-bottom: 3.5rem;
}

.section-tag {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
  display: block;
}

.section-title {
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  margin-bottom: 1rem;
}

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

/* --- Stats Counter Section --- */
.stats-section {
  padding: 3rem 0 5rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.stat-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-card);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-brand);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: var(--bg-card-border-hover);
  box-shadow: var(--shadow-card-hover);
}

.stat-card:hover::before {
  opacity: 1;
}

.stat-number {
  font-family: var(--font-display);
  font-size: 2.75rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1;
  margin-bottom: 0.5rem;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.stat-desc {
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* --- Projects Showcase (Bento Grid) --- */
.projects-section {
  padding: 5rem 0 6rem;
}

.projects-filter {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.filter-btn {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  color: var(--text-muted);
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-btn:hover {
  color: var(--text-main);
  border-color: var(--accent-cyan);
}

.filter-btn.active {
  background: rgba(6, 182, 212, 0.15);
  border-color: var(--accent-cyan);
  color: #38bdf8;
  font-weight: 600;
}

.projects-bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 2rem;
}

/* Project Card Base */
.project-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-card);
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

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

.project-featured {
  grid-column: span 12;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
  padding: 3rem;
}

.project-half {
  grid-column: span 6;
}

.project-glow-backdrop {
  position: absolute;
  top: -50px;
  right: -50px;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  opacity: 0.12;
}

.glow-blue { background: #3b82f6; }
.glow-emerald { background: #10b981; }
.glow-indigo { background: #6366f1; }

.project-meta-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.project-category {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  color: var(--accent-cyan);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.project-live-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #34d399;
}

.project-title {
  font-size: 1.85rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.project-title a:hover {
  color: var(--accent-cyan);
}

.project-tagline {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text-main);
  margin-bottom: 1rem;
}

.project-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 1.5rem;
}

/* Feature bullets */
.project-features {
  list-style: none;
  margin-bottom: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.project-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.project-features li svg {
  flex-shrink: 0;
  margin-top: 3px;
  color: var(--accent-cyan);
}

/* Tech tag pills */
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.tech-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--bg-card-border);
  color: var(--text-dim);
}

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

.project-url-link {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.project-url-link:hover {
  color: var(--accent-cyan);
}

/* Project Interactive UI Preview / Mockup Frame */
.project-preview-mockup {
  background: rgba(10, 15, 26, 0.8);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.mockup-header {
  background: rgba(255, 255, 255, 0.03);
  padding: 0.65rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid var(--bg-card-border);
}

.mockup-dots {
  display: flex;
  gap: 6px;
}

.mockup-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }

.mockup-address-bar {
  margin-left: 0.75rem;
  flex: 1;
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--radius-sm);
  padding: 0.2rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.725rem;
  color: var(--text-dim);
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

.mockup-body {
  padding: 1.5rem;
}

/* Specific ClearStats Preview Component */
.clearstats-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.cs-metric-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
}

.cs-metric-name {
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
}

.cs-metric-val {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  margin-block: 0.2rem;
}

.cs-metric-delta {
  font-size: 0.725rem;
  font-weight: 600;
}

.delta-up { color: #34d399; }
.delta-down { color: #f87171; }

.cs-ai-insight-box {
  background: rgba(6, 182, 212, 0.08);
  border-left: 3px solid var(--accent-cyan);
  padding: 0.85rem 1rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.8rem;
  color: #e0f2fe;
  line-height: 1.45;
}

/* Scanner Preview Component */
.scanner-preview-box {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.scanner-byte-stream {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-cyan);
  background: rgba(0, 0, 0, 0.4);
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  line-height: 1.5;
  border: 1px dashed rgba(6, 182, 212, 0.3);
}

.scanner-result-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
}

/* Trámites Preview Component */
.tramites-search-sim {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  padding: 0.6rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.tramites-tag-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tramite-chip {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--bg-card-border);
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* --- Services / What We Do Section --- */
.services-section {
  padding: 5rem 0;
  position: relative;
}

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

.service-card {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  box-shadow: var(--shadow-card);
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.service-card:hover {
  border-color: var(--bg-card-border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

.service-icon-box {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--bg-card-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  margin-bottom: 1.5rem;
}

.service-title {
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
}

.service-desc {
  font-size: 0.925rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.service-tags {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.service-tag {
  font-family: var(--font-mono);
  font-size: 0.725rem;
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.08);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

/* --- Philosophy / How We Work Section --- */
.philosophy-section {
  padding: 5rem 0;
}

.philosophy-card {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.75), rgba(30, 41, 59, 0.4));
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
  padding: 3.5rem;
  position: relative;
  overflow: hidden;
}

.philosophy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  position: relative;
  z-index: 1;
}

.philosophy-item h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.philosophy-item p {
  font-size: 0.925rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* --- Contact & CTA Section --- */
.contact-section {
  padding: 6rem 0;
  position: relative;
}

.contact-wrapper {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
  padding: 3.5rem;
  box-shadow: var(--shadow-card);
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3.5rem;
  align-items: start;
}

.contact-info h2 {
  font-size: 2.35rem;
  margin-bottom: 1rem;
}

.contact-info p {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.contact-method-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-main);
  font-size: 0.95rem;
}

.contact-email-link {
  transition: color var(--transition-fast);
}

.contact-email-link:hover {
  color: var(--accent-cyan) !important;
}

.contact-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--bg-card-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.15rem;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.95rem;
  transition: all var(--transition-fast);
  outline: none;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.05);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-feedback {
  padding: 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  display: none;
}

.form-feedback.success {
  display: block;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid var(--accent-emerald);
  color: #34d399;
}

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--bg-card-border);
  padding: 4rem 0 2.5rem;
  background: rgba(5, 7, 12, 0.8);
  font-size: 0.9rem;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer-brand-col {
  max-width: 320px;
}

.footer-brand-col p {
  margin-top: 0.75rem;
  font-size: 0.875rem;
}

.footer-links-group {
  display: flex;
  gap: 3.5rem;
  flex-wrap: wrap;
}

.footer-col h4 {
  font-size: 0.95rem;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

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

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--bg-card-border);
  color: var(--text-dim);
  font-size: 0.825rem;
}

/* --- Responsive Media Queries --- */
@media (max-width: 1024px) {
  .project-featured {
    grid-template-columns: 1fr;
  }

  .philosophy-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .contact-wrapper {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: rgba(7, 9, 14, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--bg-card-border);
    flex-direction: column;
    padding: 2rem 1.5rem;
    gap: 1.5rem;
    transform: translateY(-150%);
    transition: transform var(--transition-normal);
  }

  .nav-menu.open {
    transform: translateY(0);
  }

  .mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .project-half {
    grid-column: span 12;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .system-status-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .clearstats-preview-grid {
    grid-template-columns: 1fr 1fr;
  }

  .philosophy-card {
    padding: 2rem;
  }

  .contact-wrapper {
    padding: 2rem;
  }
}
