/* ============================================================
   MEMORIE STUDIO — style.css
   ============================================================ */

:root {
  --bg:       #05030e;
  --bg2:      #080514;
  --bg3:      #0c0820;
  --surface:  #100d1e;
  --surface2: #160f28;
  --border:   #1a1030;
  --border2:  #241840;
  --p1:       #b57bee;
  --p2:       #8b5cf6;
  --p3:       #6d28d9;
  --p4:       #3b0764;
  --pdim:     #2a1650;
  --white:    #ede8f8;
  --muted:    #4a3570;
  --muted2:   #7a5aaa;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--white);
  font-family: 'Cabinet Grotesk', sans-serif;
  overflow-x: hidden;
}

/* Background grid */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(181,123,238,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(181,123,238,.04) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* Blobs */
.blob { position: fixed; border-radius: 50%; pointer-events: none; z-index: 0; filter: blur(120px); }
.b1 { width: 600px; height: 600px; top: -200px; left: -150px; background: #3b0764; opacity: .5; }
.b2 { width: 500px; height: 500px; bottom: 0; right: -100px; background: #1e0a4a; opacity: .4; }
.b3 { width: 350px; height: 350px; top: 45%; left: 50%; transform: translate(-50%,-50%); background: #2d1060; opacity: .25; }

section, nav, footer { position: relative; z-index: 2; }

/* ============================================================
   NAV
   ============================================================ */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 3rem;
  background: rgba(5,3,14,.8);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
}

.nav-brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; }
.nav-logo {
  width: 30px; height: 30px;
  background: var(--p4); border: 1px solid var(--p3);
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem; font-weight: 800; color: var(--p1);
}
.nav-title { font-family: 'DM Mono', monospace; font-size: .78rem; color: var(--muted2); letter-spacing: .04em; }

.nav-links { display: flex; gap: 2.5rem; list-style: none; }
.nav-links a {
  font-family: 'DM Mono', monospace; font-size: .7rem; color: var(--muted);
  text-decoration: none; letter-spacing: .08em; text-transform: uppercase; transition: color .2s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--p1); }

.nav-right { display: flex; align-items: center; gap: 1rem; }

.nav-gh {
  font-family: 'DM Mono', monospace; font-size: .72rem;
  color: var(--p1); text-decoration: none;
  border: 1px solid var(--pdim); padding: .45rem 1rem;
  background: rgba(107,40,217,.08); transition: all .2s;
  display: flex; align-items: center; gap: .5rem;
}
.nav-gh:hover { background: rgba(107,40,217,.22); color: var(--white); }
.nav-gh svg { width: 14px; height: 14px; }

/* Hamburger button */
.hamburger {
  display: none;
  flex-direction: column; justify-content: center; align-items: center;
  gap: 5px; width: 36px; height: 36px;
  background: transparent; border: 1px solid var(--border2); cursor: pointer;
  padding: 0; transition: border-color .2s;
}
.hamburger:hover { border-color: var(--p2); }
.hamburger span {
  display: block; width: 18px; height: 1.5px;
  background: var(--muted2); transition: all .3s;
}

/* Hamburger open state */
.hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile overlay */
.mobile-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 98;
  background: rgba(5,3,14,.6);
  backdrop-filter: blur(4px);
}
.mobile-overlay.show { display: block; }

/* ============================================================
   HERO
   ============================================================ */
#hero { min-height: 100vh; display: flex; align-items: center; padding: 8rem 3rem 5rem; }
.hero-inner { max-width: 1100px; margin: 0 auto; width: 100%; }

.hero-pill {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: 'DM Mono', monospace; font-size: .68rem;
  color: var(--muted2); letter-spacing: .14em; text-transform: uppercase;
  border: 1px solid var(--border2); background: rgba(107,40,217,.07);
  padding: .4rem 1rem; margin-bottom: 2rem;
}
.pill-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--p1);
  animation: ppulse 2s ease infinite;
}
@keyframes ppulse {
  0%,100% { opacity:1; box-shadow: 0 0 0 0 rgba(181,123,238,.6); }
  50% { opacity:.5; box-shadow: 0 0 0 5px rgba(181,123,238,0); }
}

h1.hname {
  font-size: clamp(4rem, 9vw, 8rem);
  font-weight: 800; line-height: .93; letter-spacing: -.035em;
  margin-bottom: 1.8rem;
}
.hname .l1 { color: var(--white); display: block; }
.hname .l2 { color: transparent; -webkit-text-stroke: 1px var(--p2); display: block; }
.hname .l3 { color: var(--p1); display: block; font-style: italic; }

.hero-bot {
  display: grid; grid-template-columns: 1fr auto;
  gap: 4rem; align-items: end;
  padding-top: 2rem; border-top: 1px solid var(--border);
}
.hero-bio { font-size: 1rem; font-weight: 300; color: var(--muted2); line-height: 1.85; max-width: 500px; }
.hero-bio strong { color: var(--white); font-weight: 500; }
.hero-acts { display: flex; gap: .8rem; margin-top: 1.8rem; flex-wrap: wrap; }

.btn {
  font-family: 'DM Mono', monospace; font-size: .75rem; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase; padding: .85rem 2rem;
  text-decoration: none; transition: all .2s;
}
.btn.fill { background: var(--p2); color: #fff; border: 1px solid var(--p2); }
.btn.fill:hover { background: var(--p1); border-color: var(--p1); }
.btn.out { background: transparent; color: var(--muted2); border: 1px solid var(--border2); }
.btn.out:hover { border-color: var(--p2); color: var(--p1); }

.hstats { display: flex; flex-direction: column; gap: 0; }
.hst {
  padding: 1.2rem 1.5rem; border: 1px solid var(--border);
  background: var(--surface); text-align: right;
}
.hst + .hst { border-top: none; }
.hst-n { font-size: 2rem; font-weight: 800; color: var(--p1); line-height: 1; }
.hst-l { font-family: 'DM Mono', monospace; font-size: .62rem; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; margin-top: .3rem; }

/* ============================================================
   SECTION COMMONS
   ============================================================ */
.sw { max-width: 1100px; margin: 0 auto; padding: 6rem 3rem; }
.stag { font-family: 'DM Mono', monospace; font-size: .65rem; color: var(--p1); letter-spacing: .2em; text-transform: uppercase; margin-bottom: .6rem; }
.sh { font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 800; line-height: 1; letter-spacing: -.03em; margin-bottom: 3rem; }
.sh em { font-style: italic; color: var(--p1); }
.sh .strk { color: transparent; -webkit-text-stroke: 1px var(--p2); }

/* ============================================================
   ABOUT
   ============================================================ */
#about { background: var(--bg2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.ag { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; }
.ab p { font-size: .92rem; font-weight: 300; color: var(--muted2); line-height: 1.9; margin-bottom: 1.2rem; }
.ab p strong { color: var(--white); font-weight: 500; }

.plats { display: flex; flex-direction: column; gap: .5rem; margin-top: 2rem; }
.plat {
  display: flex; align-items: center; justify-content: space-between;
  padding: .75rem 1rem; border: 1px solid var(--border);
  background: var(--surface); text-decoration: none; color: var(--muted2);
  font-family: 'DM Mono', monospace; font-size: .78rem; transition: all .22s;
}
.plat:hover { border-color: var(--p3); color: var(--p1); background: var(--surface2); }

.aside { display: flex; flex-direction: column; gap: 1px; background: var(--border); border: 1px solid var(--border); }
.asc { background: var(--surface); padding: 1.5rem; }
.asc-n { font-size: 2.4rem; font-weight: 800; color: var(--p1); line-height: 1; margin-bottom: .3rem; }
.asc-l { font-family: 'DM Mono', monospace; font-size: .68rem; color: var(--muted); letter-spacing: .07em; }

/* ============================================================
   ADDONS
   ============================================================ */
#addons { background: var(--bg); }
.agrid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); }
.adc {
  background: var(--bg); padding: 1.8rem;
  display: flex; flex-direction: column; gap: .7rem;
  text-decoration: none; color: inherit; transition: background .2s;
  position: relative; overflow: hidden;
}
.adc::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--p2); transform: scaleX(0); transform-origin: left; transition: transform .3s;
}
.adc:hover { background: var(--surface); }
.adc:hover::after { transform: scaleX(1); }
.adc.feat { grid-column: span 2; background: var(--surface); }
.adc.feat::after { transform: scaleX(1); background: var(--p1); }

.abadge {
  font-family: 'DM Mono', monospace; font-size: .6rem; letter-spacing: .12em;
  text-transform: uppercase; padding: .22rem .65rem; align-self: flex-start; border: 1px solid;
}
.abadge.hot { color: var(--p1); border-color: rgba(181,123,238,.3); background: rgba(181,123,238,.07); }
.abadge.std { color: var(--muted); border-color: var(--border); }

.aname { font-size: 1.05rem; font-weight: 700; color: var(--white); line-height: 1.2; }
.adc.feat .aname { font-size: 1.5rem; }
.adesc { font-size: .8rem; font-weight: 300; color: var(--muted2); line-height: 1.65; flex: 1; }
.afoot { display: flex; justify-content: space-between; align-items: center; padding-top: .75rem; border-top: 1px solid var(--border); margin-top: auto; }
.adl { font-family: 'DM Mono', monospace; font-size: .72rem; color: var(--p1); }
.aver { font-family: 'DM Mono', monospace; font-size: .68rem; color: var(--muted); }

.see-all {
  display: inline-flex; align-items: center; gap: .5rem; margin-top: 2rem;
  font-family: 'DM Mono', monospace; font-size: .75rem; color: var(--muted2);
  text-decoration: none; border-bottom: 1px solid var(--border); padding-bottom: .2rem; transition: color .2s, border-color .2s;
}
.see-all:hover { color: var(--p1); border-color: var(--p1); }

/* ============================================================
   PROYECTOS
   ============================================================ */
#proyectos { background: var(--bg2); border-top: 1px solid var(--border); }
.pj { border: 1px solid var(--border); display: grid; grid-template-columns: 260px 1fr; transition: border-color .22s; }
.pj:hover { border-color: var(--p3); }
.pj + .pj { margin-top: 1px; }
.pj-l { background: var(--surface); padding: 2rem; border-right: 1px solid var(--border); display: flex; flex-direction: column; justify-content: space-between; }
.pj-type { font-family: 'DM Mono', monospace; font-size: .62rem; color: var(--p1); letter-spacing: .14em; text-transform: uppercase; margin-bottom: .5rem; }
.pj-name { font-size: 1.2rem; font-weight: 700; line-height: 1.2; }
.pj-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1.2rem; }
.ptag { font-family: 'DM Mono', monospace; font-size: .62rem; color: var(--muted); border: 1px solid var(--border); padding: .2rem .55rem; }
.pj-r { background: var(--bg); padding: 2rem; display: flex; flex-direction: column; justify-content: space-between; }
.pj-desc { font-size: .9rem; font-weight: 300; color: var(--muted2); line-height: 1.8; }
.pj-links { display: flex; gap: 1.2rem; margin-top: 1.5rem; }
.plink { font-family: 'DM Mono', monospace; font-size: .72rem; color: var(--muted2); text-decoration: none; transition: color .2s; }
.plink:hover { color: var(--p1); }

/* ============================================================
   STACK
   ============================================================ */
#stack { background: var(--bg); border-top: 1px solid var(--border); }
.sgrid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); }
.sc { background: var(--surface); padding: 1.5rem; display: flex; flex-direction: column; gap: .5rem; transition: background .2s; }
.sc:hover { background: var(--surface2); }
.sc-icon { font-size: 1.4rem; line-height: 1; }
.sc-name { font-size: 1rem; font-weight: 700; color: var(--white); }
.sc-desc { font-family: 'DM Mono', monospace; font-size: .72rem; color: var(--muted); line-height: 1.6; }
.sc-tag { font-family: 'DM Mono', monospace; font-size: .62rem; color: var(--p1); margin-top: auto; letter-spacing: .08em; }

/* ============================================================
   CONTACTO
   ============================================================ */
#contacto { background: var(--bg2); border-top: 1px solid var(--border); }
.cg { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: start; }
.ctext { font-size: .92rem; font-weight: 300; color: var(--muted2); line-height: 1.85; margin-bottom: 1.8rem; }
.cls { display: flex; flex-direction: column; gap: .5rem; }
.cl {
  display: flex; align-items: center; justify-content: space-between;
  padding: .85rem 1.1rem; border: 1px solid var(--border);
  text-decoration: none; color: var(--muted2); font-size: .85rem; transition: all .2s;
}
.cl:hover { border-color: var(--p3); color: var(--p1); background: var(--surface); }
.cl-lbl { display: flex; align-items: center; gap: .7rem; }
.cl-lbl svg { width: 16px; height: 16px; flex-shrink: 0; }

.cf { display: flex; flex-direction: column; gap: .8rem; }
.crow { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.cgp { display: flex; flex-direction: column; gap: .4rem; }
.clbl { font-family: 'DM Mono', monospace; font-size: .65rem; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; }
.ci, .cta {
  background: var(--surface); border: 1px solid var(--border);
  color: var(--white); font-family: 'Cabinet Grotesk', sans-serif;
  font-size: .88rem; font-weight: 300; padding: .8rem 1rem;
  outline: none; transition: border-color .2s; resize: none; width: 100%;
}
.ci:focus, .cta:focus { border-color: var(--p3); }
.ci::placeholder, .cta::placeholder { color: var(--muted); }
.ci.error, .cta.error { border-color: #e05;  }
.cta { height: 110px; }

.csub {
  background: var(--p2); color: #fff; border: none;
  font-family: 'Cabinet Grotesk', sans-serif;
  font-size: .85rem; font-weight: 700; padding: .9rem 2rem;
  cursor: pointer; align-self: flex-start; transition: background .2s;
}
.csub:hover:not(:disabled) { background: var(--p1); }
.csub:disabled { opacity: .5; cursor: not-allowed; }

.cok  { font-family: 'DM Mono', monospace; font-size: .75rem; color: var(--p1); margin-top: .3rem; }
.cerr { font-family: 'DM Mono', monospace; font-size: .75rem; color: #e05;     margin-top: .3rem; }

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  background: var(--bg); border-top: 1px solid var(--border);
  padding: 1.6rem 3rem;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem;
}
.fl { font-family: 'DM Mono', monospace; font-size: .72rem; color: var(--muted); }
.fl span { color: var(--p1); }
.fr { font-size: .75rem; color: var(--muted); font-weight: 300; }

/* ============================================================
   DIVIDER
   ============================================================ */
.vdiv { height: 4px; background: repeating-linear-gradient(90deg, var(--p3) 0,var(--p3) 8px, transparent 8px, transparent 16px); opacity: .35; }

/* ============================================================
   REVEAL ANIMATION
   ============================================================ */
.rv { opacity: 0; transform: translateY(20px); transition: opacity .65s ease, transform .65s ease; }
.rv.in { opacity: 1; transform: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  nav { padding: .9rem 1.2rem; }

  /* Hide desktop links, show hamburger */
  .nav-links {
    display: none;
    position: fixed; top: 0; right: 0; bottom: 0;
    width: min(280px, 80vw);
    background: var(--bg2);
    border-left: 1px solid var(--border2);
    z-index: 99;
    flex-direction: column; gap: 0;
    padding: 5rem 0 2rem;
    list-style: none;
  }
  .nav-links.open { display: flex; }
  .nav-links li { border-bottom: 1px solid var(--border); }
  .nav-links a {
    display: block; padding: 1rem 1.5rem;
    font-size: .8rem; letter-spacing: .1em;
  }

  .hamburger { display: flex; }

  #hero { padding: 6rem 1.2rem 3rem; }
  .sw { padding: 4rem 1.2rem; }
  .hero-bot { grid-template-columns: 1fr; gap: 2rem; }
  .hstats { flex-direction: row; gap: 1px; }
  .hst { flex: 1; text-align: center; }
  .ag, .cg { grid-template-columns: 1fr; gap: 2.5rem; }
  .agrid, .sgrid { grid-template-columns: 1fr; }
  .adc.feat { grid-column: span 1; }
  .pj { grid-template-columns: 1fr; }
  .pj-l { border-right: none; border-bottom: 1px solid var(--border); }
  .crow { grid-template-columns: 1fr; }
  footer { padding: 1.2rem; flex-direction: column; align-items: flex-start; }
}