/* ============================================================
   fsperandio.tech — Stylesheet (startup style)
   ============================================================ */

/* ── CSS Variables ──────────────────────────────────────────── */
:root {
  --bg:           #0d1117;
  --surface:      #161b22;
  --border:       #21262d;
  --accent:       #00d4ff;
  --accent-hover: #38bdf8;
  --text:         #e6edf3;
  --muted:        #8b949e;
  --font:         'Inter', system-ui, -apple-system, sans-serif;
  --radius:       8px;
  --radius-lg:    16px;
  --transition:   0.2s ease;
}

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

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

ul {
  list-style: none;
}

/* ── Layout Utilities ───────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 96px 0;
}

.section-alt {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 48px;
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  font-family: var(--font);
  white-space: nowrap;
}

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

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 0 24px rgba(0, 212, 255, 0.35);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}

.btn-outline:hover {
  background: rgba(0, 212, 255, 0.08);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.8rem;
}

/* ── Navbar ─────────────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.nav-logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  transition: color var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-cta {
  display: flex;
  align-items: center;
}

.lang-switcher {
  display: flex;
  align-items: center;
  gap: 4px;
}

.lang-btn {
  background: none;
  border: 1.5px solid transparent;
  border-radius: 6px;
  padding: 4px 7px;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  opacity: 0.45;
  transition: all var(--transition);
}

.lang-btn:hover {
  opacity: 0.8;
  border-color: var(--border);
  background: var(--surface);
}

.lang-btn.active {
  opacity: 1;
  border-color: rgba(0, 212, 255, 0.35);
  background: rgba(0, 212, 255, 0.06);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}

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

/* ── Hero ───────────────────────────────────────────────────── */
#hero {
  position: relative;
  padding: 112px 0 96px;
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 40%, transparent 100%);
  pointer-events: none;
}

.hero-eyebrow {
  margin-bottom: 24px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.25);
  border-radius: 100px;
  padding: 6px 16px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.02em;
}

.hero-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
  50% { opacity: 0.7; box-shadow: 0 0 0 4px rgba(34, 197, 94, 0); }
}

.hero-title {
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: var(--text);
  margin-bottom: 20px;
}

.hero-title span {
  color: var(--accent);
}

.hero-subtitle {
  font-size: clamp(0.9rem, 2vw, 1.05rem);
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-bottom: 24px;
}

.hero-summary {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.8;
  max-width: 580px;
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 56px;
}

.hero-social-proof {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.social-proof-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.company-strip {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.company-strip span {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--border);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color var(--transition);
}

.company-strip span:hover {
  color: var(--muted);
}

/* ── Services ───────────────────────────────────────────────── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: border-color var(--transition), transform var(--transition);
}

.service-card:hover {
  border-color: rgba(0, 212, 255, 0.35);
  transform: translateY(-2px);
}

.service-icon {
  font-size: 1.75rem;
  margin-bottom: 16px;
  line-height: 1;
}

.service-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

.service-desc {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 20px;
}

.service-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.service-stack li {
  font-size: 0.78rem;
  color: var(--muted);
  font-family: 'SF Mono', 'Fira Code', monospace;
}

.service-stack li::before {
  content: '$ ';
  color: var(--accent);
}

/* ── Work / Track Record ────────────────────────────────────── */
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.work-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  transition: border-color var(--transition), transform var(--transition);
}

.work-card:hover {
  border-color: rgba(0, 212, 255, 0.25);
  transform: translateY(-2px);
}

.work-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.work-company {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}

.work-role {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.timeline-date {
  font-size: 0.75rem;
  color: var(--muted);
  background: rgba(139, 148, 158, 0.1);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 4px 12px;
  white-space: nowrap;
  flex-shrink: 0;
}

.work-desc {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 16px;
}

.work-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  background: rgba(0, 212, 255, 0.07);
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 4px;
  padding: 3px 8px;
}

/* ── Differentiators ────────────────────────────────────────── */
.diff-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.diff-card {
  text-align: center;
  padding: 32px 16px;
}

.diff-stat {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 12px;
}

.diff-label {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ── About ──────────────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 64px;
  align-items: center;
}

.about-content .section-title {
  margin-bottom: 24px;
}

.about-text {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 16px;
  max-width: 560px;
}

.about-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 24px;
}

.about-meta span {
  font-size: 0.85rem;
  color: var(--muted);
}

.about-card-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.about-avatar {
  width: 180px;
  height: 180px;
  border: 2px solid var(--border);
  border-radius: 50%;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 0 0 4px rgba(0, 212, 255, 0.1), 0 8px 32px rgba(0, 0, 0, 0.4);
  transition: box-shadow var(--transition);
}

.about-avatar:hover {
  box-shadow: 0 0 0 4px rgba(0, 212, 255, 0.25), 0 8px 32px rgba(0, 0, 0, 0.4);
}

.about-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.about-links {
  display: flex;
  gap: 10px;
}

/* ── Contact ────────────────────────────────────────────────── */
#contact {
  padding-bottom: 0;
}

.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 72px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.contact-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 50%;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--accent), transparent);
}

.contact-headline {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 16px;
  line-height: 1.2;
}

.contact-headline span {
  color: var(--accent);
}

.contact-pitch {
  font-size: 1rem;
  color: var(--muted);
  max-width: 520px;
  margin: 0 auto 36px;
  line-height: 1.8;
}

.contact-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

/* ── Footer ─────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  margin-top: 64px;
}

.footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-size: 0.8rem;
  color: var(--muted);
  transition: color var(--transition);
}

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

/* ── Scroll Animations ──────────────────────────────────────── */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-up:nth-child(1) { transition-delay: 0ms; }
.fade-up:nth-child(2) { transition-delay: 80ms; }
.fade-up:nth-child(3) { transition-delay: 160ms; }
.fade-up:nth-child(4) { transition-delay: 240ms; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .services-grid,
  .work-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 768px) {
  .section {
    padding: 64px 0;
  }

  /* Navbar */
  .nav-links {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 0;
    z-index: 99;
  }

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

  .nav-links a {
    width: 100%;
    padding: 14px 24px;
  }

  .nav-links a::after {
    display: none;
  }

  .nav-cta {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .lang-switcher {
    order: -1; /* move flags before hamburger on mobile */
  }

  /* Hero */
  #hero {
    min-height: auto;
    padding: 72px 0 56px;
  }

  .hero-title {
    font-size: clamp(2rem, 10vw, 3rem);
  }

  /* About */
  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-card-side {
    flex-direction: row;
    justify-content: flex-start;
  }

  /* Contact */
  .contact-card {
    padding: 48px 24px;
  }

  /* Footer */
  .footer .container {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero-actions,
  .contact-actions {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .btn {
    width: 100%;
    justify-content: center;
  }

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