/* Mikel Lombarte — Coqueto & Postureable */
:root {
  --bg: #0f0e17;
  --bg-card: #1a1925;
  --text: #f8f7fc;
  --muted: #a1a1aa;
  --accent: #6366f1;
  --accent-2: #a78bfa;
  --accent-3: #ec4899;
  --gradient: linear-gradient(135deg, #6366f1, #a78bfa, #ec4899);
  --glow: 0 0 40px rgba(99, 102, 241, 0.3);
  --radius: 16px;
  --font: "Plus Jakarta Sans", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

a { color: inherit; }

.container {
  width: min(1100px, calc(100% - 48px));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 12px; top: 10px;
  padding: 10px 14px;
  background: var(--accent);
  color: white;
  border-radius: 10px;
  font-weight: 600;
  transform: translateY(-150%);
  transition: transform 0.2s;
  z-index: 999;
}
.skip-link:focus { transform: translateY(0); }

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 14, 23, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  font-weight: 800;
  font-size: 1.2rem;
  text-decoration: none;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-emoji { font-size: 1.3rem; }

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

.nav-toggle {
  display: none;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.1);
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
}

.nav-toggle-icon {
  width: 18px; height: 14px;
  display: inline-block;
  background:
    linear-gradient(var(--text), var(--text)) 0 0 / 100% 2px no-repeat,
    linear-gradient(var(--text), var(--text)) 0 50% / 100% 2px no-repeat,
    linear-gradient(var(--text), var(--text)) 0 100% / 100% 2px no-repeat;
}

.nav-menu { display: flex; align-items: center; gap: 4px; }

.nav-link {
  text-decoration: none;
  padding: 10px 16px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
}
.nav-link:hover { color: var(--text); background: rgba(99, 102, 241, 0.15); }

.nav-cta {
  text-decoration: none;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--gradient);
  color: white;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
  transition: transform 0.2s, box-shadow 0.2s;
}
.nav-cta:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(99, 102, 241, 0.5); }

/* Hero */
.hero {
  position: relative;
  padding: 80px 0 100px;
  overflow: hidden;
}

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

.hero-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.25;
}

.hero-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--bg) 0%, transparent 40%, transparent 60%, var(--bg) 100%);
}

.float-emoji {
  position: absolute;
  font-size: 2.5rem;
  opacity: 0.15;
  animation: float 6s ease-in-out infinite;
}

.e1 { top: 15%; left: 10%; animation-delay: 0s; }
.e2 { top: 25%; right: 15%; animation-delay: 1s; }
.e3 { bottom: 30%; left: 20%; animation-delay: 2s; }
.e4 { bottom: 20%; right: 10%; animation-delay: 0.5s; }
.e5 { top: 50%; left: 50%; animation-delay: 1.5s; }

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

.hero-layout {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: start;
}

.hero-intro {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}

.avatar {
  width: 64px; height: 64px;
  border-radius: 999px;
  object-fit: cover;
  border: 3px solid transparent;
  background: linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
              var(--gradient) border-box;
  flex-shrink: 0;
}

.badge {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.2);
  border: 1px solid rgba(99, 102, 241, 0.4);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-2);
  letter-spacing: 0.02em;
}

.hero h1 {
  margin: 0 0 20px;
  font-size: clamp(34px, 4.5vw, 48px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--text);
}

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

.subtitle {
  margin: 0 0 28px;
  font-size: 1.1rem;
  color: var(--muted);
  line-height: 1.65;
  max-width: 480px;
}

.hero-perks {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.perk {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.08);
}

/* Form */
.hero-form-wrap {
  padding: 36px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: var(--glow);
}

.form-title {
  margin: 0 0 28px;
  font-size: 1.35rem;
  font-weight: 700;
}

.form { display: grid; gap: 0; }

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
}

input:not([type="checkbox"]),
select,
textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23a78bfa' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

textarea { resize: vertical; min-height: 90px; }

input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.field-error {
  min-height: 18px;
  font-size: 0.82rem;
  color: #f87171;
}

.check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 10px;
}
.check input { width: 20px; height: 20px; margin-top: 2px; flex-shrink: 0; }
.check span { font-size: 0.9rem; color: var(--muted); }

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 16px;
  border-radius: 12px;
  border: none;
  background: var(--gradient);
  color: white;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 10px;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.35);
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.45);
}

.form-status {
  margin-top: 14px;
  font-size: 0.88rem;
  color: var(--muted);
  min-height: 22px;
}

/* Sections */
.section { padding: 90px 0; }
.section-alt {
  background: linear-gradient(180deg, transparent 0%, rgba(99, 102, 241, 0.05) 50%, transparent 100%);
}

.section-title {
  margin: 0 0 48px;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.emoji { font-size: 1.4em; }

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

.service {
  padding: 32px;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.06);
  background: var(--bg-card);
  transition: all 0.3s ease;
}
.service:hover {
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: 0 12px 40px rgba(99, 102, 241, 0.15);
}

.service-emoji {
  display: block;
  font-size: 2rem;
  margin-bottom: 16px;
}

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

.service p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.6;
}

.service.service-img {
  position: relative;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.service.service-img::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15,14,23,0.85) 0%, rgba(15,14,23,0.95) 100%);
}
.service.service-img .service-emoji,
.service.service-img h3,
.service.service-img p {
  position: relative;
  z-index: 1;
}

/* Tech Gallery */
.tech-gallery {
  padding: 60px 0;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.gallery-item {
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255,255,255,0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.gallery-item:hover {
  transform: scale(1.02);
  box-shadow: 0 12px 40px rgba(99, 102, 241, 0.2);
}

/* Projects */
.projects {
  display: grid;
  gap: 24px;
}

.project {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 28px;
  align-items: start;
  padding: 36px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.06);
  transition: all 0.3s ease;
}
.project:hover {
  border-color: rgba(99, 102, 241, 0.25);
  box-shadow: 0 12px 40px rgba(99, 102, 241, 0.12);
}

.project-icon,
.project-img {
  width: 120px;
  min-height: 90px;
  border-radius: 16px;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255,255,255,0.08);
}

.project-icon {
  display: grid;
  place-items: center;
  font-size: 2rem;
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.25);
}

.project-body h3 {
  margin: 0 0 6px;
  font-size: 1.2rem;
  font-weight: 700;
}

.tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent-2);
  margin-bottom: 10px;
}

.project-body p {
  margin: 0 0 14px;
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.55;
}

.project-link {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent-2);
  text-decoration: none;
  transition: color 0.2s;
}
.project-link:hover { color: var(--accent); }

/* Footer */
.footer {
  padding: 32px 0;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

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

.footer-links a {
  font-size: 0.9rem;
  color: var(--muted);
  text-decoration: none;
}
.footer-links a:hover { color: var(--accent-2); }

/* Responsive */
@media (max-width: 900px) {
  .hero-layout { grid-template-columns: 1fr; }
  .services { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .header-inner { height: 64px; }
  .nav-toggle { display: inline-flex; align-items: center; gap: 8px; }
  .nav-menu {
    display: none;
    position: absolute;
    right: 24px; top: 72px;
    width: min(320px, calc(100vw - 48px));
    flex-direction: column;
    padding: 20px;
    border-radius: var(--radius);
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: var(--glow);
  }
  .nav-menu.is-open { display: flex; }
  .nav-link, .nav-cta { width: 100%; text-align: center; }
  .hero { padding: 56px 0 72px; }
  .hero h1 { font-size: 30px; }
  .float-emoji { font-size: 1.8rem; }
  .project { grid-template-columns: 1fr; }
  .project-icon { width: 56px; height: 56px; font-size: 1.6rem; }
  .project-img { width: 100%; min-height: 160px; }
  .gallery-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .float-emoji { animation: none; }
  .service, .project { transition: none; }
}
