/* ============================================================
   styles.css — Main Stylesheet
   Mariano Gendra Personal Website
   ============================================================ */

/* ── Reset & Base ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100vh;
}

img, svg, video {
  max-width: 100%;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
}

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input, textarea, select {
  font-family: inherit;
}

/* ── Skip Link (Accessibility) ── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 9999;
  padding: 12px 20px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: var(--radius);
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 16px;
  outline: 3px solid var(--accent-hover);
  outline-offset: 2px;
}

/* ── Focus Ring ── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-faint); }

/* ── Container ── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

@media (min-width: 768px) {
  .container { padding: 0 40px; }
}

/* ─────────────────────────────────────────────────────────────
   NAVIGATION
───────────────────────────────────────────────────────────── */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 64px;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--nav-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

@media (min-width: 768px) {
  .nav-inner { padding: 0 40px; }
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo-mark {
  width: 36px;
  height: 36px;
  /*background: var(--accent);*/
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', 'Consolas', monospace;
}

.nav-logo-text {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

/* Desktop nav links */
.nav-links {
  display: none;
  align-items: center;
  gap: 28px;
}

@media (min-width: 900px) {
  .nav-links { display: flex; }
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  position: relative;
  padding-bottom: 2px;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
}

/* Nav Actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Theme toggle */
#theme-toggle {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  background: transparent;
  padding: 0;
  flex-shrink: 0;
}

#theme-toggle:hover {
  background: var(--surface-alt);
}

.icon-moon, .icon-sun {
  width: 18px;
  height: 18px;
}

[data-theme="light"] .icon-moon { display: none; }
[data-theme="light"] .icon-sun  { display: block; }
.icon-sun { display: none; }
.icon-moon { display: block; }

/* Hamburger */
.nav-hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  padding: 7px 7px;
  background: transparent;
  flex-shrink: 0;
}

@media (min-width: 900px) {
  .nav-hamburger { display: none; }
}

/* Mobile nav drawer */
.mobile-nav {
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  z-index: 99;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  padding: 16px 24px 24px;
  gap: 4px;
}

.mobile-nav-link {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  display: block;
}

.mobile-nav-link:last-child { border-bottom: none; }

.mobile-nav-link:hover {
  color: var(--accent);
}

/* ─────────────────────────────────────────────────────────────
   SECTION UTILITIES
───────────────────────────────────────────────────────────── */
section {
  scroll-margin-top: 64px;
}

.section-pad {
  padding: 96px 0;
}

.section-pad-sm {
  padding: 64px 0;
}

.section-bg-alt {
  background-color: var(--surface-alt);
}

.section-bg-surface {
  background-color: var(--surface);
}

/* Section Heading */
.section-heading {
  text-align: center;
  margin-bottom: 56px;
}

.section-overline {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
  font-family: 'JetBrains Mono', 'Consolas', monospace;
}

.section-title {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text);
}

.section-subtitle {
  margin-top: 16px;
  font-size: 1.0625rem;
  color: var(--text-muted);
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

/* ─────────────────────────────────────────────────────────────
   BUTTONS
───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius);
  text-decoration: none;
  line-height: 1;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #ffffff;
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}

.btn-outline:hover {
  background: var(--accent);
  color: #ffffff;
}

.btn-ghost {
  background: var(--surface-alt);
  color: var(--text);
  border-color: var(--border);
}

.btn-ghost:hover {
  background: var(--surface-hover);
  border-color: var(--border-hover);
  color: var(--text);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.8125rem;
}

.btn-lg {
  padding: 14px 32px;
  font-size: 1rem;
}

/* ─────────────────────────────────────────────────────────────
   HERO SECTION
───────────────────────────────────────────────────────────── */
#hero {
  min-height: 100svh;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 80px 24px 64px;
  overflow: hidden;
  background-color: var(--bg);
}

/* Background image — opacity is controlled here independently */
#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('/assets/images/background.webp');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  opacity: 0.05;
  pointer-events: none;
  z-index: 0;
}

/* Radial glow */
#hero::after {
  content: '';
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(var(--accent-rgb), 0.07) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 760px;
  width: 100%;
}

.hero-overline {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}

.hero-name {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 20px;
}

.hero-role-line {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: clamp(1.125rem, 2.5vw, 1.5rem);
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 24px;
  min-height: 2rem;
}

.hero-role-prefix {
  color: var(--text-muted);
}

.hero-tagline {
  font-size: clamp(1rem, 1.8vw, 1.125rem);
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 540px;
  margin: 0 auto 36px;
}

.hero-ctas {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 48px;
}

.hero-socials {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.hero-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, transform 0.15s ease;
}

.hero-social-link:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(var(--accent-rgb), 0.08);
  transform: translateY(-2px);
}

.hero-scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  color: var(--text-muted); /* was --text-faint: failed WCAG AA at ~2.5:1 */
  animation: subtle-float 2.5s ease-in-out infinite;
  cursor: pointer;
}

/* ─────────────────────────────────────────────────────────────
   ABOUT SECTION
───────────────────────────────────────────────────────────── */
#about {
  background-color: var(--surface);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 56px;
  align-items: center;
}

@media (min-width: 768px) {
  .about-grid {
    grid-template-columns: 300px 1fr;
    gap: 64px;
  }
}

/* Photo column */
.about-photo-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.about-photo-wrap {
  position: relative;
  width: 220px;
  height: 220px;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .about-photo-wrap {
    width: 260px;
    height: 260px;
  }
}

.about-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 3px solid var(--border);
}

/* Placeholder photo */
.about-photo-placeholder {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-lg);
  border: 3px solid var(--border);
  background: var(--surface-alt);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-faint);
  font-size: 0.75rem;
  text-align: center;
}

.about-photo-placeholder svg {
  width: 56px;
  height: 56px;
  margin: 0 auto;
}

/* Certification badges */
.about-certs {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.cert-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
}

.cert-badge-icon {
  width: 50px;
  height: 50px;
  /*background: #FF9900;*/
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  flex-shrink: 0;
}

/* Text column */
.about-text-col {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.about-heading {
  font-size: clamp(1.5rem, 2.5vw, 1.875rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--text);
}

.about-body p {
  color: var(--text-muted);
  line-height: 1.75;
  font-size: 1.0625rem;
}

.about-body p + p {
  margin-top: 16px;
}

.about-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Stats row */
.stats-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 8px;
}

@media (min-width: 480px) {
  .stats-row { grid-template-columns: repeat(4, 1fr); }
}

.stat-item {
  text-align: center;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 12px;
}

.stat-number {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--accent);
  line-height: 1.1;
  font-family: 'JetBrains Mono', monospace;
}

.stat-number sup {
  font-size: 0.6em;
  vertical-align: super;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 500;
}

/* ─────────────────────────────────────────────────────────────
   SKILLS SECTION
───────────────────────────────────────────────────────────── */
#skills {
  background-color: var(--bg);
}

/* Filter pills */
.skills-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 40px;
}

.skill-filter-btn {
  padding: 7px 18px;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 100px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.skill-filter-btn:hover,
.skill-filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* Skills categories */
.skills-categories {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 600px) {
  .skills-categories { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1000px) {
  .skills-categories { grid-template-columns: repeat(3, 1fr); }
}

.skills-category {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.skills-category-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.skills-category-icon {
  width: 32px;
  height: 32px;
  background: rgba(var(--accent-rgb), 0.12);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}

.skills-category-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
}

.skills-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-pill {
  padding: 5px 13px;
  font-size: 0.8125rem;
  font-weight: 500;
  border-radius: 100px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: default;
}

.skill-pill.expert {
  background: var(--tag-bg);
  border-color: var(--tag-border);
  color: var(--accent);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
}

/* ─────────────────────────────────────────────────────────────
   EXPERIENCE SECTION
───────────────────────────────────────────────────────────── */
#experience {
  background-color: var(--surface);
}

.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

/* Vertical line */
.timeline::before {
  content: '';
  position: absolute;
  left: 18px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
  z-index: 0;
}

@media (min-width: 640px) {
  .timeline::before {
    left: 24px;
  }
}

.timeline-entry {
  position: relative;
  padding-left: 56px;
  margin-bottom: 40px;
}

@media (min-width: 640px) {
  .timeline-entry { padding-left: 68px; }
}

.timeline-entry:last-child {
  margin-bottom: 0;
}

/* Circle node */
.timeline-node {
  position: absolute;
  left: 8px;
  top: 20px;
  width: 22px;
  height: 22px;
  background: var(--surface);
  border: 2.5px solid var(--accent);
  border-radius: 50%;
  z-index: 1;
}

@media (min-width: 640px) {
  .timeline-node {
    left: 14px;
    width: 22px;
    height: 22px;
  }
}

.timeline-node.current {
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.2);
}

.timeline-card {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
}

.timeline-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.timeline-role {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.timeline-company {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--accent);
  margin-top: 2px;
}

.timeline-date {
  font-size: 0.8125rem;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 4px 12px;
  white-space: nowrap;
  flex-shrink: 0;
  font-family: 'JetBrains Mono', monospace;
}

.timeline-desc {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 14px;
}

.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.timeline-tag {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 100px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}

/* ─────────────────────────────────────────────────────────────
   PORTFOLIO SECTION
───────────────────────────────────────────────────────────── */
#portfolio {
  background-color: var(--bg);
}

.portfolio-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 40px;
}

.portfolio-filter-btn {
  padding: 7px 20px;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 100px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.portfolio-filter-btn:hover,
.portfolio-filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  position: relative;
  min-height: 200px;
}

@media (min-width: 600px) {
  .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .portfolio-grid { grid-template-columns: repeat(3, 1fr); }
}

.portfolio-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.portfolio-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.portfolio-img-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--surface-alt);
  flex-shrink: 0;
}

.portfolio-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.portfolio-card:hover .portfolio-img {
  transform: scale(1.05);
}

/* Placeholder image */
.portfolio-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-faint);
  font-size: 0.75rem;
}

/* Hover overlay */
.portfolio-overlay {
  position: absolute;
  inset: 0;
  background: rgba(var(--accent-rgb), 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.portfolio-card:hover .portfolio-overlay {
  opacity: 1;
}

.portfolio-overlay-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: var(--radius);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease;
}

.portfolio-overlay-link:hover {
  background: rgba(255,255,255,0.35);
  color: #fff;
}

.portfolio-card-body {
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.portfolio-category-tag {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.portfolio-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.portfolio-card-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
}

.portfolio-card-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
  flex-wrap: wrap;
}

.portfolio-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--accent);
}

.portfolio-link:hover {
  color: var(--accent-hover);
}

/* ─────────────────────────────────────────────────────────────
   SERVICES SECTION
───────────────────────────────────────────────────────────── */
#services {
  background-color: var(--surface-alt);
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 600px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .services-grid { grid-template-columns: repeat(3, 1fr); }
}

.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.service-icon {
  width: 48px;
  height: 48px;
  background: rgba(var(--accent-rgb), 0.1);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.service-icon svg {
  width: 24px;
  height: 24px;
}

.service-title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.service-desc {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.7;
  flex: 1;
}

.services-cta {
  text-align: center;
  margin-top: 48px;
}

/* ─────────────────────────────────────────────────────────────
   TESTIMONIALS SECTION
───────────────────────────────────────────────────────────── */
#testimonials {
  background-color: var(--surface);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 640px) {
  .testimonials-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 960px) {
  .testimonials-grid { grid-template-columns: repeat(3, 1fr); }
}

.testimonial-card {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.testimonial-stars {
  display: flex;
  gap: 3px;
  color: #F59E0B;
}

.testimonial-stars svg {
  width: 16px;
  height: 16px;
}

.testimonial-quote-icon {
  width: 32px;
  height: 32px;
  color: var(--accent);
  opacity: 0.4;
  flex-shrink: 0;
}

.testimonial-text {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.75;
  flex: 1;
  font-style: italic;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.testimonial-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
  overflow: hidden;
}

.testimonial-name {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.testimonial-role {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.testimonials-placeholder-note {
  text-align: center;
  margin-top: 32px;
  padding: 12px 20px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius);
  font-size: 0.8125rem;
  color: #F59E0B;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* ─────────────────────────────────────────────────────────────
   BLOG SECTION (Homepage Preview)
───────────────────────────────────────────────────────────── */
#blog {
  background-color: var(--bg);
}

.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 640px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .blog-grid { grid-template-columns: repeat(3, 1fr); }
}

.blog-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.blog-card-img-wrap {
  aspect-ratio: 16 / 9;
  background: var(--surface-alt);
  overflow: hidden;
  position: relative;
}

.blog-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Blog placeholder image */
.blog-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
}

.blog-card-body {
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.blog-category-tag {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.blog-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
  flex: 1;
}

.blog-card-title a {
  color: inherit;
  text-decoration: none;
}

.blog-card-title a:hover {
  color: var(--accent);
}

.blog-card-excerpt {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.blog-card-meta-sep {
  width: 3px;
  height: 3px;
  background: var(--text-faint);
  border-radius: 50%;
}

.blog-view-all {
  text-align: center;
  margin-top: 48px;
}

/* ─────────────────────────────────────────────────────────────
   CONTACT SECTION
───────────────────────────────────────────────────────────── */
#contact {
  background-color: var(--surface-alt);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
}

@media (min-width: 768px) {
  .contact-grid { grid-template-columns: 1fr 1.5fr; gap: 64px; }
}

/* Contact info column */
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact-info-heading {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.contact-info-text {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact-detail-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.contact-detail-icon {
  width: 36px;
  height: 36px;
  background: rgba(var(--accent-rgb), 0.1);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}

.contact-detail-icon svg { width: 18px; height: 18px; }

.contact-detail-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  margin-bottom: 2px;
}

.contact-detail-value {
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.contact-detail-value a {
  color: var(--text-muted);
}

.contact-detail-value a:hover {
  color: var(--accent);
}

/* Availability badge */
.availability-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 100px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #10B981;
  width: fit-content;
}

/* Contact Form */
.contact-form-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 480px) {
  .form-row { grid-template-columns: repeat(2, 1fr); }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.form-label span {
  color: var(--accent);
  margin-left: 2px;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 11px 14px;
  font-size: 0.9375rem;
  color: var(--text);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  appearance: none;
  -webkit-appearance: none;
}

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238D96A8' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

.form-textarea {
  resize: vertical;
  min-height: 130px;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-faint);
}

/* Form error state */
.form-group.has-error .form-input,
.form-group.has-error .form-textarea,
.form-group.has-error .form-select {
  border-color: #EF4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.form-error-msg {
  font-size: 0.8125rem;
  color: #EF4444;
  display: none;
}

.form-group.has-error .form-error-msg {
  display: block;
}

/* Submit button */
.form-submit-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.form-submit-btn {
  flex: 1;
  min-width: 140px;
}

/* Success state */
.form-success {
  display: none;
  text-align: center;
  padding: 32px 24px;
}

.form-success.show {
  display: block;
}

.form-success-icon {
  width: 56px;
  height: 56px;
  background: rgba(16, 185, 129, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #10B981;
  margin: 0 auto 16px;
}

.form-success-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.form-success-text {
  font-size: 0.9375rem;
  color: var(--text-muted);
}

/* ─────────────────────────────────────────────────────────────
   FOOTER
───────────────────────────────────────────────────────────── */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 40px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.footer-copy {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-socials {
  display: flex;
  gap: 12px;
}

.footer-social {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.footer-social:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(var(--accent-rgb), 0.08);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-nav a {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--accent);
}

/* ─────────────────────────────────────────────────────────────
   BACK TO TOP
───────────────────────────────────────────────────────────── */
#back-to-top {
  position: fixed;
  bottom: 32px;
  right: 24px;
  z-index: 50;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  border: none;
}

#back-to-top:hover {
  background: var(--accent-hover);
  transform: translateY(-3px) !important;
}

/* ─────────────────────────────────────────────────────────────
   BLOG PAGE (blog.html)
───────────────────────────────────────────────────────────── */
.blog-page-header {
  padding: 120px 0 64px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.blog-page-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 12px;
}

.blog-page-subtitle {
  font-size: 1.0625rem;
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto;
}

.blog-page-content {
  padding: 64px 0 96px;
  background: var(--bg);
}

.blog-search-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.blog-search-input {
  flex: 1;
  min-width: 200px;
  padding: 11px 16px;
  font-size: 0.9375rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.blog-search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.15);
  outline: none;
}

.blog-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}

.blog-filter-pill {
  padding: 6px 16px;
  font-size: 0.8125rem;
  font-weight: 500;
  border-radius: 100px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.blog-filter-pill.active,
.blog-filter-pill:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ─────────────────────────────────────────────────────────────
   BLOG POST PAGE (blog-post.html)
───────────────────────────────────────────────────────────── */
.post-header {
  padding: 120px 0 64px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.post-header-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
}

@media (min-width: 768px) {
  .post-header-inner { padding: 0 40px; }
}

.post-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.post-breadcrumb a { color: var(--accent); }

.post-category-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
  font-family: 'JetBrains Mono', monospace;
}

.post-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 20px;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.875rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.post-author {
  display: flex;
  align-items: center;
  gap: 8px;
}

.post-author-avatar {
  width: 30px;
  height: 30px;
  /*border-radius: 50%;*/
  /*background: var(--accent);*/
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6875rem;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
}

.post-body-wrap {
  padding: 64px 0 96px;
  background: var(--bg);
}

.post-body {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
}

@media (min-width: 768px) {
  .post-body { padding: 0 40px; }
}

/* Article typography */
.post-content {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--text-muted);
}

.post-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.015em;
  margin: 48px 0 16px;
  line-height: 1.3;
}

.post-content h3 {
  font-size: 1.1875rem;
  font-weight: 700;
  color: var(--text);
  margin: 32px 0 12px;
}

.post-content p { margin-bottom: 20px; }

.post-content ul,
.post-content ol {
  padding-left: 24px;
  margin-bottom: 20px;
}

.post-content ul { list-style: disc; }
.post-content ol { list-style: decimal; }

.post-content li { margin-bottom: 8px; }

.post-content a { color: var(--accent); text-decoration: underline; }
.post-content a:hover { color: var(--accent-hover); }

.post-content blockquote {
  margin: 32px 0;
  padding: 20px 24px;
  border-left: 4px solid var(--accent);
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 1.0625rem;
  font-style: italic;
}

.post-content code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875em;
  background: var(--code-bg);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--accent);
}

.post-content pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  overflow-x: auto;
  margin: 24px 0;
}

.post-content pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.875rem;
  color: var(--text);
}

.post-content strong { color: var(--text); font-weight: 700; }

.post-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}

/* Post tags */
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.post-tag {
  padding: 5px 14px;
  font-size: 0.8125rem;
  font-weight: 500;
  border-radius: 100px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

/* Post CTA / Author box */
.post-author-box {
  margin-top: 48px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.post-author-box-avatar {
  width: 64px;
  height: 64px;
  border-radius: var(--radius);
  background: var(--surface-alt);
  border: 2px solid var(--border);
  overflow: hidden;
  flex-shrink: 0;
}

.post-author-box-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-author-box-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.post-author-box-bio {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 12px;
}

/* Related posts */
.related-posts {
  margin-top: 64px;
}

.related-posts-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 24px;
}

/* ─────────────────────────────────────────────────────────────
   UTILITIES
───────────────────────────────────────────────────────────── */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.text-accent { color: var(--accent); }
.text-muted  { color: var(--text-muted); }
.font-mono   { font-family: 'JetBrains Mono', 'Consolas', monospace; }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }

/* ─────────────────────────────────────────────────────────────
   RESPONSIVE OVERRIDES
───────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .btn { padding: 10px 18px; font-size: 0.875rem; }
  .section-pad { padding: 72px 0; }
  .section-heading { margin-bottom: 40px; }
  .hero-ctas { flex-direction: column; align-items: stretch; }
  .hero-ctas .btn { text-align: center; justify-content: center; }
  .about-photo-wrap { width: 180px; height: 180px; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .contact-form-wrap { padding: 24px 18px; }
}


/* ── Language Toggle ── */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 8px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  transition: border-color 0.2s, color 0.2s;
}
.lang-toggle:hover {
  border-color: var(--accent);
  color: var(--text);
}
.lang-toggle .lang-btn-en,
.lang-toggle .lang-btn-es {
  /* solid --text-muted (inherited) replaces opacity: 0.4 — passes WCAG AA */
  transition: color 0.2s;
}
.lang-toggle .lang-btn-en.active,
.lang-toggle .lang-btn-es.active {
  color: var(--accent);
}
.lang-divider {
  /* inherits --text-muted from .lang-toggle — no opacity reduction needed */
}
.mobile-lang-toggle {
  padding: 12px 24px 0;
}
.mobile-lang-toggle .lang-toggle {
  font-size: 0.75rem;
  padding: 6px 12px;
}

/* ─────────────────────────────────────────────────────────────
   BLOG PAGINATION
───────────────────────────────────────────────────────────── */
.blog-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 48px;
  flex-wrap: wrap;
}

.pagination-pages {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  cursor: pointer;
  white-space: nowrap;
}

a.pagination-btn:hover {
  background: var(--surface-hover);
  border-color: var(--border-hover);
  color: var(--text);
}

.pagination-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  cursor: default;
}

.pagination-btn.pagination-disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

.pagination-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 38px;
  color: var(--text-muted);
  font-size: 0.875rem;
  user-select: none;
}

.pagination-summary {
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 12px;
}

@media (max-width: 480px) {
  .pagination-prev span,
  .pagination-next span { display: none; }
  .pagination-btn { min-width: 34px; height: 34px; padding: 0 10px; font-size: 0.8125rem; }
}
