/* arcoding.dev — main.css */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&family=DM+Sans:ital,wght@0,300;0,400;0,500;1,300&display=swap');

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

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

body {
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  color: #0C0C0E;
  background: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ─── Variables ─── */
:root {
  --ink:      #0C0C0E;
  --ink2:     #3A3A44;
  --ink3:     #7C7C8A;
  --surface:  #F7F7F8;
  --white:    #FFFFFF;
  --accent:   #5B5BD6;
  --accent2:  #8B8BF0;
  --accent-bg: rgba(91, 91, 214, 0.08);
  --border:   rgba(0, 0, 0, 0.08);
  --hero-bg:  #0C0C0E;
  --radius:   10px;
  --radius-sm: 7px;
  --transition: 0.2s ease;
}

/* ─── Typography helpers ─── */
.font-display { font-family: 'Plus Jakarta Sans', sans-serif; }

h1, h2, h3, h4 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.5px;
}

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

/* ─── Navigation ─── */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--hero-bg);
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.07);
  transition: background var(--transition), box-shadow var(--transition);
}

#navbar.scrolled {
  background: rgba(12, 12, 14, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

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

.nav-logo {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: #fff;
  letter-spacing: -0.3px;
}
.nav-logo span { color: var(--accent2); }

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

.nav-links a {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 400;
  transition: color var(--transition);
}
.nav-links a:hover { color: #fff; }

.nav-cta {
  font-size: 12px;
  font-weight: 500;
  background: var(--accent);
  color: #fff !important;
  padding: 8px 16px;
  border-radius: 6px;
  transition: opacity var(--transition) !important;
}
.nav-cta:hover { opacity: 0.85; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
}

/* ─── Hero ─── */
#hero {
  background: var(--hero-bg);
  padding: 136px 0 88px;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(91, 91, 214, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(91, 91, 214, 0.06) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none;
}

.hero-glow {
  position: absolute;
  top: -120px;
  right: -80px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(91,91,214,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner { position: relative; }

.hero-eyebrow {
  font-size: 11px;
  font-weight: 500;
  color: var(--accent2);
  letter-spacing: 1.8px;
  text-transform: uppercase;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'DM Sans', sans-serif;
  opacity: 0;
  animation: fadeUp 0.6s ease 0.1s forwards;
}
.hero-eyebrow::before {
  content: '';
  display: inline-block;
  width: 22px;
  height: 1px;
  background: var(--accent2);
}

#hero h1 {
  font-size: clamp(32px, 4.5vw, 52px);
  font-weight: 600;
  color: #fff;
  margin-bottom: 22px;
  max-width: 600px;
  letter-spacing: -1.5px;
  opacity: 0;
  animation: fadeUp 0.6s ease 0.2s forwards;
}
#hero h1 em { color: var(--accent2); font-style: normal; }

.hero-sub {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.75;
  max-width: 440px;
  margin-bottom: 36px;
  font-weight: 300;
  opacity: 0;
  animation: fadeUp 0.6s ease 0.3s forwards;
}

.hero-actions {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.6s ease 0.4s forwards;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  padding: 12px 22px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  font-family: 'DM Sans', sans-serif;
  transition: opacity var(--transition), transform var(--transition);
}
.btn-primary:hover { opacity: 0.88; transform: translateY(-1px); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 14px;
  font-family: 'DM Sans', sans-serif;
  transition: color var(--transition);
}
.btn-ghost:hover { color: rgba(255, 255, 255, 0.9); }

.hero-stats {
  display: flex;
  gap: 40px;
  margin-top: 56px;
  padding-top: 32px;
  border-top: 0.5px solid rgba(255, 255, 255, 0.07);
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.6s ease 0.5s forwards;
}

.stat-number {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 26px;
  font-weight: 600;
  color: #fff;
  line-height: 1;
  letter-spacing: -0.5px;
}
.stat-label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.35);
  margin-top: 6px;
  font-weight: 300;
}

/* ─── Section base ─── */
.section { padding: 80px 0; }
.section-alt { background: var(--surface); }

.section-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 1.8px;
  text-transform: uppercase;
  margin-bottom: 10px;
  font-family: 'DM Sans', sans-serif;
}

.section-title {
  font-size: clamp(22px, 2.5vw, 28px);
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 40px;
  letter-spacing: -0.5px;
}

/* ─── Servicios ─── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.service-card {
  background: var(--white);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color var(--transition), transform var(--transition);
}
.service-card:hover {
  border-color: rgba(91, 91, 214, 0.3);
  transform: translateY(-2px);
}

.service-icon {
  width: 38px;
  height: 38px;
  background: var(--accent-bg);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  color: var(--accent);
  font-size: 15px;
}

.service-name {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
  letter-spacing: -0.2px;
}

.service-desc {
  font-size: 13px;
  color: var(--ink3);
  line-height: 1.65;
  font-weight: 300;
}

/* ─── Portafolio ─── */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.project-card {
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
  transition: border-color var(--transition), transform var(--transition);
}
.project-card:hover {
  border-color: rgba(91, 91, 214, 0.3);
  transform: translateY(-2px);
}

.project-thumb {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #111827;
  position: relative;
  overflow: hidden;
}

.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.project-card:hover .project-thumb img { transform: scale(1.03); }

.project-thumb-placeholder {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.18);
  letter-spacing: 2px;
  text-transform: uppercase;
  font-family: 'DM Sans', sans-serif;
}

.project-info { padding: 18px; }

.project-name {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
  letter-spacing: -0.3px;
}

.project-desc {
  font-size: 13px;
  color: var(--ink3);
  line-height: 1.6;
  font-weight: 300;
  margin-bottom: 12px;
}

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

.tag {
  font-size: 11px;
  color: var(--accent);
  background: var(--accent-bg);
  padding: 3px 10px;
  border-radius: 99px;
  font-weight: 400;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--accent);
  margin-top: 12px;
  font-weight: 500;
  transition: gap var(--transition);
}
.project-link:hover { gap: 8px; }

/* ─── Herramientas ─── */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.tool-card {
  background: var(--white);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  transition: border-color var(--transition), transform var(--transition);
}
.tool-card:hover {
  border-color: rgba(91, 91, 214, 0.3);
  transform: translateY(-2px);
}

.tool-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: rgba(255, 255, 255, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.tool-name {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 5px;
  letter-spacing: -0.2px;
}

.tool-desc {
  font-size: 12px;
  color: var(--ink3);
  line-height: 1.6;
  font-weight: 300;
}

.tool-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--accent);
  margin-top: 10px;
  font-weight: 500;
  transition: gap var(--transition);
}
.tool-link:hover { gap: 8px; }

/* ─── Sobre mí ─── */
.about-inner {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 60px;
  align-items: center;
}

.about-avatar {
  width: 100%;
  aspect-ratio: 1;
  max-width: 280px;
  border-radius: 12px;
  background: var(--ink);
  overflow: hidden;
  border: 0.5px solid var(--border);
}
.about-avatar img { width: 100%; height: 100%; object-fit: cover; }
.about-avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.15);
  font-size: 48px;
}

.about-text p {
  font-size: 15px;
  color: var(--ink2);
  line-height: 1.8;
  font-weight: 300;
  margin-bottom: 16px;
}

.about-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.skill-tag {
  font-size: 12px;
  color: var(--ink2);
  background: var(--surface);
  border: 0.5px solid var(--border);
  padding: 5px 12px;
  border-radius: 99px;
  font-weight: 400;
}

/* ─── Contacto ─── */
#contacto { background: var(--hero-bg); }

#contacto .section-label { color: var(--accent2); }
#contacto .section-title { color: #fff; }

.contact-sub {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.4);
  font-weight: 300;
  margin-top: -28px;
  margin-bottom: 40px;
  max-width: 440px;
  line-height: 1.7;
}

.contact-form {
  max-width: 540px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
  font-weight: 400;
  letter-spacing: 0.2px;
}

.form-input,
.form-textarea {
  background: rgba(255, 255, 255, 0.05);
  border: 0.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 11px 14px;
  font-size: 14px;
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  transition: border-color var(--transition);
  outline: none;
  width: 100%;
}
.form-input::placeholder,
.form-textarea::placeholder { color: rgba(255, 255, 255, 0.2); }
.form-input:focus,
.form-textarea:focus { border-color: rgba(91, 91, 214, 0.6); }

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

.form-submit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 13px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: opacity var(--transition), transform var(--transition);
  align-self: flex-start;
}
.form-submit:hover { opacity: 0.88; transform: translateY(-1px); }

.form-message {
  font-size: 13px;
  padding: 10px 14px;
  border-radius: 8px;
  display: none;
}
.form-message.success {
  display: block;
  background: rgba(34, 197, 94, 0.1);
  border: 0.5px solid rgba(34, 197, 94, 0.3);
  color: #4ade80;
}
.form-message.error {
  display: block;
  background: rgba(239, 68, 68, 0.1);
  border: 0.5px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
}

/* ─── Footer ─── */
#footer {
  background: #080808;
  padding: 28px 0;
  border-top: 0.5px solid rgba(255, 255, 255, 0.05);
}

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

.footer-logo {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: -0.3px;
}
.footer-logo span { color: var(--accent2); }

.footer-links {
  display: flex;
  gap: 20px;
}
.footer-links a {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.25);
  transition: color var(--transition);
}
.footer-links a:hover { color: rgba(255, 255, 255, 0.6); }

.footer-copy {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.2);
  font-weight: 300;
}

/* ─── Animations ─── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .container { padding: 0 20px; }

  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--hero-bg);
    padding: 16px 20px 20px;
    border-bottom: 0.5px solid rgba(255,255,255,0.07);
    gap: 16px;
  }
  .nav-toggle { display: block; }

  #hero { padding: 110px 0 64px; }
  #hero h1 { font-size: 30px; letter-spacing: -1px; }

  .hero-stats { gap: 24px; }

  .services-grid,
  .portfolio-grid,
  .tools-grid { grid-template-columns: 1fr; }

  .about-inner { grid-template-columns: 1fr; gap: 32px; }
  .about-avatar { max-width: 180px; }

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

  .footer-inner { flex-direction: column; align-items: flex-start; gap: 8px; }
}
