/* ============================================================
   PORTFOLIO-V1 — STYLES.CSS — Sofía Estrada
   Dark minimal · Monochrome + Lime accent · Space Grotesk + Instrument Serif
   ============================================================ */

:root {
  --accent: #a3e635;
  --accent-dark: #84cc16;
  --accent-rgb: 163, 230, 53;

  --dark-950: #0a0a0b;
  --dark-900: #111113;
  --dark-800: #18181b;
  --dark-700: #212124;
  --dark-600: #2c2c30;
  --dark-500: #3f3f46;
  --dark-400: #5a5a63;
  --dark-300: #82828c;
  --dark-200: #ababb5;
  --dark-100: #d8d8e0;

  --white: #ffffff;
  --canvas: var(--dark-950);
  --canvas-alt: var(--dark-900);
  --ink: var(--dark-100);
  --ink-soft: var(--dark-200);
  --muted: var(--dark-300);
  --border: var(--dark-600);

  --font-main: 'Space Grotesk', system-ui, sans-serif;
  --font-display: 'Instrument Serif', Georgia, serif;

  --fs-xs: clamp(0.7rem, 0.65rem + 0.25vw, 0.78rem);
  --fs-sm: clamp(0.82rem, 0.76rem + 0.3vw, 0.9rem);
  --fs-base: clamp(0.92rem, 0.86rem + 0.3vw, 1rem);
  --fs-md: clamp(1rem, 0.9rem + 0.5vw, 1.15rem);
  --fs-lg: clamp(1.15rem, 1rem + 0.75vw, 1.4rem);
  --fs-xl: clamp(1.4rem, 1.1rem + 1.5vw, 2rem);
  --fs-2xl: clamp(1.8rem, 1.3rem + 2.5vw, 2.8rem);
  --fs-3xl: clamp(2.2rem, 1.5rem + 3.5vw, 3.6rem);
  --fs-4xl: clamp(3rem, 2rem + 5vw, 5rem);

  --section-py: clamp(60px, 8vw, 120px);
  --container-max: 1100px;
  --container-px: clamp(16px, 4vw, 32px);

  --radius-sm: 8px; --radius-md: 12px; --radius-lg: 16px; --radius-xl: 20px; --radius-2xl: 28px; --radius-full: 9999px;
  --shadow-md: 0 4px 20px rgba(0,0,0,0.4); --shadow-lg: 0 12px 40px rgba(0,0,0,0.5);
  --ease: cubic-bezier(0.4, 0, 0.2, 1); --duration: 0.35s;
  --z-sticky: 200; --z-overlay: 300; --z-preloader: 500;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; overflow-x: hidden; }
body { font-family: var(--font-main); font-size: var(--fs-base); color: var(--ink); background: var(--canvas); line-height: 1.7; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color var(--duration) var(--ease); }
ul, ol { list-style: none; }
button { border: none; background: none; cursor: pointer; font: inherit; color: inherit; }
input, textarea, select { font: inherit; color: var(--ink); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 13px 16px; background: var(--dark-800); width: 100%; transition: border-color var(--duration), box-shadow var(--duration); }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.12); }
input::placeholder, textarea::placeholder { color: var(--dark-500); }
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='%235a5a63' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
::selection { background: rgba(var(--accent-rgb), 0.2); }

.container { max-width: var(--container-max); margin: 0 auto; padding: 0 var(--container-px); }
.kicker { display: inline-block; font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.section-title { font-family: var(--font-main); font-size: var(--fs-3xl); font-weight: 700; line-height: 1.1; letter-spacing: -0.03em; color: var(--white); margin-bottom: 14px; }
.section-title em { font-family: var(--font-display); font-style: italic; font-weight: 400; color: var(--accent); }
.section-lead { font-size: var(--fs-md); color: var(--muted); max-width: 560px; line-height: 1.8; }
.section-header { margin-bottom: 48px; }
.section-header--center { text-align: center; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; font-size: var(--fs-sm); border-radius: var(--radius-full); padding: 12px 28px; transition: all var(--duration) var(--ease); border: 2px solid transparent; white-space: nowrap; }
.btn .material-icons { font-size: 18px; }
.btn--accent { background: var(--accent); color: var(--dark-950); box-shadow: 0 4px 16px rgba(var(--accent-rgb), 0.25); }
.btn--accent:hover { background: var(--accent-dark); transform: translateY(-2px); box-shadow: 0 8px 28px rgba(var(--accent-rgb), 0.35); }
.btn--outline { border-color: var(--border); color: var(--ink); }
.btn--outline:hover { border-color: var(--accent); color: var(--accent); }
.btn--sm { padding: 8px 20px; font-size: var(--fs-xs); }
.btn--lg { padding: 16px 36px; font-size: var(--fs-base); }
.btn--block { width: 100%; }

/* PRELOADER */
.preloader { position: fixed; inset: 0; z-index: var(--z-preloader); background: var(--dark-950); display: flex; align-items: center; justify-content: center; transition: opacity 0.6s var(--ease), visibility 0.6s var(--ease); }
.preloader.loaded { opacity: 0; visibility: hidden; pointer-events: none; }
.preloader__text { font-size: var(--fs-lg); font-weight: 700; color: var(--white); letter-spacing: -0.02em; margin-bottom: 12px; }
.preloader__line { width: 60px; height: 2px; background: var(--dark-600); border-radius: 2px; position: relative; overflow: hidden; margin: 0 auto; }
.preloader__line::after { content: ''; position: absolute; inset: 0; background: var(--accent); animation: lineSlide 1s ease-in-out infinite; }
@keyframes lineSlide { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }

.scroll-progress { position: fixed; top: 0; left: 0; height: 2px; width: 100%; z-index: calc(var(--z-sticky) + 1); background: var(--accent); transform-origin: left; transform: scaleX(0); }

/* NAVBAR */
.navbar { position: sticky; top: 0; z-index: var(--z-sticky); background: rgba(10,10,11,0.88); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-bottom: 1px solid rgba(255,255,255,0.04); transition: box-shadow var(--duration); }
.navbar.scrolled { box-shadow: 0 4px 30px rgba(0,0,0,0.5); }
.navbar__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.navbar__brand { font-size: var(--fs-lg); font-weight: 300; color: var(--white); letter-spacing: -0.02em; }
.navbar__brand strong { font-weight: 700; color: var(--accent); font-size: 1.3em; }
.navbar__list { display: flex; gap: 4px; }
.navbar__link { padding: 6px 14px; font-size: var(--fs-xs); font-weight: 600; color: var(--dark-300); border-radius: var(--radius-md); transition: color var(--duration), background var(--duration); }
.navbar__link:hover, .navbar__link.active { color: var(--white); background: rgba(255,255,255,0.05); }
.navbar__actions { display: flex; align-items: center; gap: 12px; }
.navbar__burger { display: none; width: 28px; height: 20px; position: relative; }
.navbar__burger span { display: block; height: 2px; background: var(--white); border-radius: 2px; position: absolute; left: 0; right: 0; transition: all var(--duration); }
.navbar__burger span:nth-child(1) { top: 0; }
.navbar__burger span:nth-child(2) { bottom: 0; }
.navbar__burger.active span:nth-child(1) { top: 50%; transform: translateY(-50%) rotate(45deg); }
.navbar__burger.active span:nth-child(2) { bottom: 50%; transform: translateY(50%) rotate(-45deg); }

/* HERO */
.hero { padding: clamp(100px, 15vw, 180px) 0 0; text-align: center; }
.hero__tag { display: block; font-size: var(--fs-xs); font-weight: 600; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 24px; }
.hero__title { font-size: var(--fs-4xl); font-weight: 700; line-height: 1.05; color: var(--white); max-width: 800px; margin: 0 auto 24px; letter-spacing: -0.04em; }
.hero__lead { font-size: var(--fs-md); color: var(--muted); max-width: 560px; margin: 0 auto 36px; line-height: 1.8; }
.hero__actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero__marquee { margin-top: 80px; padding: 18px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); overflow: hidden; }
.hero__marquee-track { display: flex; gap: 24px; width: max-content; }
.hero__marquee-track span { font-size: var(--fs-lg); font-weight: 700; color: var(--dark-500); white-space: nowrap; letter-spacing: -0.02em; text-transform: uppercase; }

/* WORK */
.work { padding: var(--section-py) 0; }
.work__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.work-card { position: relative; border-radius: var(--radius-xl); overflow: hidden; cursor: pointer; display: block; }
.work-card--wide { grid-column: span 2; }
.work-card__img { position: relative; overflow: hidden; }
.work-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.work-card:not(.work-card--wide) .work-card__img { height: 400px; }
.work-card--wide .work-card__img { height: 440px; }
.work-card:hover .work-card__img img { transform: scale(1.04); }
.work-card__info { position: absolute; bottom: 0; left: 0; right: 0; padding: 28px; background: linear-gradient(to top, rgba(0,0,0,0.8), transparent); }
.work-card__tags { font-size: var(--fs-xs); font-weight: 700; color: var(--accent); margin-bottom: 8px; display: block; letter-spacing: 0.04em; }
.work-card__info h3 { font-size: var(--fs-lg); font-weight: 700; color: var(--white); margin-bottom: 4px; }
.work-card__info p { font-size: var(--fs-sm); color: rgba(255,255,255,0.6); }

/* ABOUT */
.about { padding: var(--section-py) 0; }
.about__grid { display: grid; grid-template-columns: 0.45fr 0.55fr; gap: 48px; align-items: center; }
.about__img img { width: 100%; height: 500px; object-fit: cover; border-radius: var(--radius-2xl); filter: grayscale(0.3); }
.about__content p { font-size: var(--fs-md); color: var(--muted); line-height: 1.8; margin-bottom: 14px; }
.about__tools { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 24px; }
.about__tools span { font-size: var(--fs-xs); font-weight: 700; padding: 6px 14px; border: 1px solid var(--border); border-radius: var(--radius-full); color: var(--ink-soft); transition: all var(--duration); }
.about__tools span:hover { border-color: var(--accent); color: var(--accent); }

/* SERVICES */
.services { padding: var(--section-py) 0; background: var(--dark-900); }
.services__list { display: grid; gap: 0; }
.svc-row { display: grid; grid-template-columns: 60px 1fr auto; align-items: center; gap: 24px; padding: 28px 0; border-bottom: 1px solid var(--border); transition: all var(--duration); }
.svc-row:first-child { border-top: 1px solid var(--border); }
.svc-row:hover { padding-left: 16px; background: rgba(255,255,255,0.02); }
.svc-row__num { font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 400; color: var(--dark-500); font-style: italic; }
.svc-row__content h3 { font-size: var(--fs-lg); font-weight: 700; color: var(--white); margin-bottom: 4px; }
.svc-row__content p { font-size: var(--fs-sm); color: var(--muted); }
.svc-row__arrow { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border); color: var(--muted); transition: all var(--duration); }
.svc-row:hover .svc-row__arrow { background: var(--accent); color: var(--dark-950); border-color: var(--accent); }

/* TESTIMONIALS */
.testimonials { padding: var(--section-py) 0; }
.testi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.testi-card { padding: 28px; border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--dark-800); transition: all var(--duration); }
.testi-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.testi-card--accent { background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.08), rgba(var(--accent-rgb), 0.02)); border-color: rgba(var(--accent-rgb), 0.15); }
.testi-card blockquote { font-size: var(--fs-sm); color: var(--ink-soft); line-height: 1.7; font-style: italic; margin-bottom: 20px; }
.testi-card__author { display: flex; align-items: center; gap: 12px; padding-top: 16px; border-top: 1px solid var(--border); }
.testi-card--accent .testi-card__author { border-top-color: rgba(var(--accent-rgb), 0.1); }
.testi-card__author img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.testi-card__author strong { display: block; font-size: var(--fs-sm); font-weight: 700; color: var(--white); }
.testi-card__author span { font-size: var(--fs-xs); color: var(--muted); }

/* CTA */
.cta { padding: var(--section-py) 0; text-align: center; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.cta p { font-size: var(--fs-md); color: var(--muted); margin-bottom: 28px; }

/* CONTACT */
.contact { padding: var(--section-py) 0; }
.contact__grid { display: grid; grid-template-columns: 0.4fr 0.6fr; gap: 48px; align-items: start; }
.contact__details { display: grid; gap: 14px; margin-top: 20px; }
.contact__details > div { display: flex; align-items: center; gap: 10px; font-size: var(--fs-sm); color: var(--muted); }
.contact__details .material-icons { font-size: 20px; color: var(--accent); }
.contact__details a { color: var(--accent); font-weight: 600; }
.contact__social { display: flex; gap: 12px; margin-top: 28px; }
.contact__social a { font-size: var(--fs-xs); font-weight: 700; color: var(--dark-400); padding: 6px 14px; border: 1px solid var(--border); border-radius: var(--radius-full); transition: all var(--duration); }
.contact__social a:hover { border-color: var(--accent); color: var(--accent); }
.contact__form { padding: 32px; border-radius: var(--radius-2xl); background: var(--dark-800); border: 1px solid var(--border); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: var(--fs-xs); font-weight: 700; margin-bottom: 5px; color: var(--ink-soft); }

/* FOOTER */
.footer { padding: 36px 0 0; border-top: 1px solid var(--border); }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding-bottom: 24px; }
.footer__logo { font-size: var(--fs-lg); font-weight: 300; color: var(--white); }
.footer__logo strong { font-weight: 700; color: var(--accent); }
.footer__links { display: flex; gap: 20px; }
.footer__links a { font-size: var(--fs-sm); color: var(--dark-400); transition: color var(--duration); }
.footer__links a:hover { color: var(--accent); }
.footer__social { display: flex; gap: 8px; }
.footer__social a { font-size: var(--fs-xs); font-weight: 700; color: var(--dark-400); padding: 6px 12px; border: 1px solid var(--border); border-radius: var(--radius-full); transition: all var(--duration); }
.footer__social a:hover { border-color: var(--accent); color: var(--accent); }
.footer__bottom { text-align: center; padding: 18px 0; border-top: 1px solid var(--border); font-size: var(--fs-xs); color: var(--dark-500); }

.back-to-top { position: fixed; bottom: 28px; right: 28px; width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: var(--dark-950); display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 16px rgba(var(--accent-rgb), 0.3); z-index: var(--z-overlay); opacity: 0; visibility: hidden; transform: translateY(16px); transition: all var(--duration); }
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(var(--accent-rgb), 0.4); }

@media (max-width: 1024px) {
  .work__grid { grid-template-columns: 1fr; }
  .work-card--wide { grid-column: auto; }
  .about__grid { grid-template-columns: 1fr; }
  .testi-grid { grid-template-columns: 1fr; }
  .contact__grid { grid-template-columns: 1fr; }
  .navbar__menu { position: fixed; inset: 0; width: 100vw; height: 100dvh; background: var(--dark-950); z-index: var(--z-overlay); display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.4s var(--ease), visibility 0s linear 0.4s; }
  .navbar__menu.open { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity 0.4s var(--ease); }
  .navbar__list { flex-direction: column; gap: 8px; }
  .navbar__link { font-size: var(--fs-lg); padding: 12px 24px; }
  .navbar__burger { display: block; position: relative; z-index: calc(var(--z-overlay) + 1); }
}
@media (max-width: 768px) {
  .svc-row { grid-template-columns: 40px 1fr auto; gap: 16px; }
  .form-row { grid-template-columns: 1fr; }
  .footer__inner { flex-direction: column; text-align: center; }
}
@media (max-width: 480px) {
  .hero__title { font-size: var(--fs-2xl); }
  .hero__actions { flex-direction: column; }
  .hero__actions .btn { width: 100%; }
  .footer__bottom { text-align: center; }
}
