/* Mariano Matera - Restyle CSS
 * Professional Portfolio - Deep Blue & Emerald Theme
 */

/* ===== CSS VARIABLES ===== */
:root {
  /* Primary Color Palette */
  --primary: #1e3a8a;
  --primary-foreground: #ffffff;
  --primary-hover: #1e40af;

  /* Secondary - Emerald */
  --secondary: #059669;
  --secondary-foreground: #ffffff;
  --secondary-hover: #047857;

  /* Accent - Amber */
  --accent: #d97706;
  --accent-foreground: #ffffff;
  --accent-hover: #b45309;

  /* Background & Foreground */
  --background: #ffffff;
  --foreground: #111827;

  /* Muted */
  --muted: #f9fafb;
  --muted-foreground: #6b7280;

  /* Card */
  --card: #ffffff;
  --card-foreground: #111827;

  /* Border */
  --border: #e5e7eb;

  /* Destructive */
  --destructive: #dc2626;
  --destructive-foreground: #ffffff;

  /* Radius */
  --radius: 0.75rem;
  --radius-sm: 0.5rem;
  --radius-lg: 1rem;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

/* ===== BASE STYLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: var(--foreground);
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.875rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

@media (min-width: 1024px) {
  h1 { font-size: 3rem; }
  h2 { font-size: 2.25rem; }
  h3 { font-size: 1.875rem; }
  h4 { font-size: 1.5rem; }
}

p {
  margin-bottom: 1rem;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

/* ===== CONTAINER ===== */
.container {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 640px) {
  .container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .container {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

/* ===== NAVIGATION ===== */
.nav-restyle {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.nav-restyle .nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

.nav-restyle .nav-logo {
  font-size: 1.25rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

@media (min-width: 768px) {
  .nav-restyle .nav-menu {
    display: flex;
  }
}

.nav-restyle .nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
  transition: color 0.2s ease;
}

.nav-restyle .nav-link:hover,
.nav-restyle .nav-link.active {
  color: var(--primary);
}

.nav-restyle .nav-cta {
  margin-left: 1rem;
}

/* Mobile menu toggle */
.nav-mobile-toggle {
  display: block;
  padding: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
}

@media (min-width: 768px) {
  .nav-mobile-toggle {
    display: none;
  }
}

.nav-mobile-toggle svg {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--foreground);
}

/* Mobile menu */
.nav-mobile-menu {
  display: none;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
}

.nav-mobile-menu.open {
  display: block;
}

@media (min-width: 768px) {
  .nav-mobile-menu {
    display: none !important;
  }
}

.nav-mobile-menu .nav-link {
  display: block;
  padding: 0.5rem 0;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--background), 0 0 0 4px var(--primary);
}

.btn-primary {
  background-color: var(--primary);
  color: var(--primary-foreground);
}

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

.btn-secondary {
  background-color: var(--secondary);
  color: var(--secondary-foreground);
}

.btn-secondary:hover {
  background-color: var(--secondary-hover);
  color: var(--secondary-foreground);
}

.btn-outline {
  background-color: transparent;
  border-color: var(--border);
  color: var(--foreground);
}

.btn-outline:hover {
  background-color: var(--muted);
  color: var(--foreground);
}

.btn-ghost {
  background-color: transparent;
  color: var(--foreground);
}

.btn-ghost:hover {
  background-color: var(--muted);
}

.btn-lg {
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
}

.btn-sm {
  padding: 0.375rem 0.875rem;
  font-size: 0.8125rem;
}

.btn-icon {
  padding: 0.625rem;
}

/* ===== CARDS ===== */
.card {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-lg);
}

.card-hover:hover {
  transform: translateY(-2px);
}

.card-header {
  padding: 1.5rem 1.5rem 0;
}

.card-content {
  padding: 1.5rem;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.card-description {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* Card with border accent */
.card-border-primary {
  border-left: 4px solid var(--primary);
}

.card-border-secondary {
  border-left: 4px solid var(--secondary);
}

.card-border-accent {
  border-left: 4px solid var(--accent);
}

.card-border-top {
  border-top: 4px solid var(--primary);
  border-left: 1px solid var(--border);
}

/* ===== BADGES ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 9999px;
  border: 1px solid transparent;
}

.badge-primary {
  background-color: rgba(30, 58, 138, 0.1);
  color: var(--primary);
  border-color: rgba(30, 58, 138, 0.2);
}

.badge-secondary {
  background-color: rgba(5, 150, 105, 0.1);
  color: var(--secondary);
  border-color: rgba(5, 150, 105, 0.2);
}

.badge-accent {
  background-color: rgba(217, 119, 6, 0.1);
  color: var(--accent);
  border-color: rgba(217, 119, 6, 0.2);
}

.badge-outline {
  background-color: transparent;
  border-color: var(--border);
  color: var(--muted-foreground);
}

.badge-muted {
  background-color: var(--muted);
  color: var(--muted-foreground);
}

/* ===== SECTIONS ===== */
.section {
  padding: 4rem 0;
}

.section-lg {
  padding: 5rem 0;
}

.section-muted {
  background-color: var(--muted);
}

.section-dark {
  background-color: var(--foreground);
  color: var(--background);
}

/* Hero gradient background */
.gradient-hero {
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.05) 0%, var(--background) 50%, rgba(217, 119, 6, 0.05) 100%);
}

/* Primary gradient background */
.gradient-primary {
  background: linear-gradient(135deg, var(--primary) 0%, rgba(30, 58, 138, 0.8) 100%);
  color: var(--primary-foreground);
}

/* Background pattern */
.bg-pattern {
  position: relative;
}

.bg-pattern::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23000000' fill-opacity='1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

/* ===== GRID & LAYOUT ===== */
.grid {
  display: grid;
  gap: 1.5rem;
}

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

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

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

@media (min-width: 768px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-2 {
  gap: 0.5rem;
}

.gap-3 {
  gap: 0.75rem;
}

.gap-4 {
  gap: 1rem;
}

.gap-6 {
  gap: 1.5rem;
}

.gap-8 {
  gap: 2rem;
}

/* ===== UTILITIES ===== */
.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

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

.text-secondary {
  color: var(--secondary);
}

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

.text-muted {
  color: var(--muted-foreground);
}

.text-sm {
  font-size: 0.875rem;
}

.text-lg {
  font-size: 1.125rem;
}

.text-xl {
  font-size: 1.25rem;
}

.text-2xl {
  font-size: 1.5rem;
}

.text-3xl {
  font-size: 1.875rem;
}

.font-medium {
  font-weight: 500;
}

.font-semibold {
  font-weight: 600;
}

.font-bold {
  font-weight: 700;
}

/* Gradient text */
.text-gradient {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Margins */
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-12 { margin-bottom: 3rem; }

.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-12 { margin-top: 3rem; }

.mx-auto { margin-left: auto; margin-right: auto; }

/* Padding */
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }

.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }

.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }

/* Width */
.w-full { width: 100%; }
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-5xl { max-width: 64rem; }
.max-w-6xl { max-width: 72rem; }

/* ===== FORM ELEMENTS ===== */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background-color: var(--background);
  color: var(--foreground);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--muted-foreground);
}

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

/* ===== ICONS ===== */
.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon-sm { width: 1rem; height: 1rem; }
.icon-md { width: 1.5rem; height: 1.5rem; }
.icon-lg { width: 2rem; height: 2rem; }

.icon-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  border-radius: var(--radius);
}

.icon-box-primary {
  background-color: rgba(30, 58, 138, 0.1);
  color: var(--primary);
}

.icon-box-secondary {
  background-color: rgba(5, 150, 105, 0.1);
  color: var(--secondary);
}

.icon-box-accent {
  background-color: rgba(217, 119, 6, 0.1);
  color: var(--accent);
}

/* ===== STATS BOX ===== */
.stats-box {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding: 1.5rem;
  background-color: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(4px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.stat-item {
  text-align: center;
}

.stat-item:not(:last-child) {
  border-right: 1px solid var(--border);
}

.stat-value {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* ===== TECH BADGES ===== */
.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tech-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  background-color: var(--muted);
  color: var(--foreground);
  border-radius: var(--radius);
}

/* ===== TESTIMONIALS ===== */
.testimonial-stars {
  display: flex;
  gap: 0.25rem;
  color: #fbbf24;
  margin-bottom: 0.75rem;
}

.testimonial-quote {
  font-style: italic;
  color: var(--muted-foreground);
  margin-bottom: 1.5rem;
}

.testimonial-author {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

.testimonial-name {
  font-weight: 600;
}

.testimonial-role {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* ===== LIST STYLES ===== */
.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.5rem 0;
}

.feature-list li svg {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  color: var(--primary);
  margin-top: 0.125rem;
}

/* ===== FOOTER ===== */
.footer-restyle {
  background-color: var(--muted);
  border-top: 1px solid var(--border);
  margin-top: 6rem;
}

.footer-restyle .footer-inner {
  padding: 3rem 0;
}

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

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.footer-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  padding: 0.25rem 0;
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  transition: color 0.2s ease;
}

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

.footer-social {
  display: flex;
  gap: 1rem;
}

.footer-social a {
  color: var(--muted-foreground);
  transition: color 0.2s ease;
}

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

.footer-social svg {
  width: 1.25rem;
  height: 1.25rem;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  text-align: center;
}

.footer-copyright {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* ===== ACCORDION ===== */
.accordion {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.accordion-item {
  border-bottom: 1px solid var(--border);
}

.accordion-item:last-child {
  border-bottom: none;
}

.accordion-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  text-align: left;
  background-color: transparent;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.accordion-trigger:hover {
  background-color: var(--muted);
}

.accordion-trigger svg {
  width: 1.25rem;
  height: 1.25rem;
  transition: transform 0.2s ease;
}

.accordion-trigger[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.accordion-content {
  padding: 0 1.5rem 1rem;
  color: var(--muted-foreground);
}

/* ===== PRICING ===== */
.pricing-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

/* ===== EXPERIENCE TIMELINE ===== */
.experience-card {
  position: relative;
}

.experience-period {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  background-color: var(--muted);
  color: var(--muted-foreground);
  border-radius: var(--radius);
}

/* ===== FILTER BUTTONS ===== */
.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.filter-btn {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  background-color: transparent;
  border: 1px solid var(--border);
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  background-color: var(--muted);
}

.filter-btn.active {
  background-color: var(--primary);
  border-color: var(--primary);
  color: var(--primary-foreground);
}

/* ===== RESPONSIVE VISIBILITY ===== */
.hidden {
  display: none;
}

@media (min-width: 768px) {
  .md\:block {
    display: block;
  }
  .md\:flex {
    display: flex;
  }
  .md\:hidden {
    display: none;
  }
}

@media (min-width: 1024px) {
  .lg\:block {
    display: block;
  }
  .lg\:flex {
    display: flex;
  }
  .lg\:hidden {
    display: none;
  }
}

/* ===== TRANSITIONS ===== */
.transition-colors {
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.transition-transform {
  transition: transform 0.2s ease;
}

.transition-shadow {
  transition: box-shadow 0.2s ease;
}

.transition-all {
  transition: all 0.2s ease;
}

/* Hover translate */
.hover\:-translate-y-1:hover {
  transform: translateY(-4px);
}

/* ===== PROSE (for long-form content) ===== */
.prose {
  max-width: 65ch;
}

.prose p {
  margin-bottom: 1.25rem;
  line-height: 1.75;
}

.prose h2 {
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.prose h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.prose ul, .prose ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.prose li {
  margin-bottom: 0.5rem;
}

/* ===== LINE CLAMP ===== */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== ASPECT RATIOS ===== */
.aspect-video {
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.aspect-square {
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

/* ===== LOADING SKELETON ===== */
.skeleton {
  background: linear-gradient(90deg, var(--muted) 25%, #f3f4f6 50%, var(--muted) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: var(--radius);
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--muted);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--muted-foreground);
}

/* ===== BORDER UTILITIES ===== */
.border {
  border: 1px solid var(--border);
}

.border-t {
  border-top: 1px solid var(--border);
}

.border-b {
  border-bottom: 1px solid var(--border);
}

.border-l {
  border-left: 1px solid var(--border);
}

.border-r {
  border-right: 1px solid var(--border);
}

.rounded {
  border-radius: var(--radius);
}

.rounded-lg {
  border-radius: var(--radius-lg);
}

.rounded-full {
  border-radius: 9999px;
}
