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

:root {
  --bg:       #05050f;
  --bg2:      #08081a;
  --surface:  #0e0e20;
  --border:   rgba(255,255,255,.07);
  --a1:       #a855f7;
  --a2:       #ec4899;
  --grd:      linear-gradient(135deg, var(--a1), var(--a2));
  --text:     #eeeeff;
  --muted:    #6060a0;
  --nav-h:    64px;
  --ff:       'Space Grotesk', system-ui, sans-serif;
  --ff-mono:  'Space Mono', monospace;
  --r:        14px;
}

html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--ff);
  line-height: 1.65;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }

/* ── NAV ────────────────────────────────────────────────────────────────────── */
.nav {
  position: fixed; inset: 0 0 auto;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 5%;
  z-index: 200;
  transition: background .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.nav.solid {
  background: rgba(5,5,15,.88);
  backdrop-filter: blur(20px);
  border-color: var(--border);
}

.nav__logo { font-size: 1.15rem; font-weight: 700; }
.nav__logo span { background: var(--grd); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

.nav__links { display: flex; gap: 2.5rem; list-style: none; }
.nav__links a { font-family: var(--ff-mono); font-size: .82rem; color: var(--muted); transition: color .2s; }
.nav__links a:hover { color: var(--text); }

.nav__burger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; }
.nav__burger span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: .25s; }
.nav__burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger.open span:nth-child(2) { opacity: 0; }
.nav__burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── HERO ───────────────────────────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center;
  padding: calc(var(--nav-h) + 4rem) 5% 6rem;
  position: relative; overflow: hidden;
}

/* aurora glow in background */
.hero::before {
  content: '';
  position: absolute; top: -20%; left: -10%;
  width: 700px; height: 700px; border-radius: 50%;
  background: radial-gradient(circle, rgba(168,85,247,.18) 0%, transparent 65%);
  pointer-events: none; animation: drift 10s ease-in-out infinite alternate;
}
.hero::after {
  content: '';
  position: absolute; bottom: -10%; right: -5%;
  width: 500px; height: 500px; border-radius: 50%;
  background: radial-gradient(circle, rgba(236,72,153,.13) 0%, transparent 65%);
  pointer-events: none; animation: drift 14s ease-in-out infinite alternate-reverse;
}
@keyframes drift { from { transform: translate(0,0); } to { transform: translate(40px, 30px); } }

.hero__eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--ff-mono); font-size: .78rem;
  background: var(--grd); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  margin-bottom: 1.8rem;
}
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--a1); flex-shrink: 0;
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{ opacity:1; transform:scale(1); } 50%{ opacity:.4; transform:scale(.8); } }

.hero__name {
  font-size: clamp(4rem, 12vw, 9rem);
  font-weight: 700; line-height: .92; letter-spacing: -.04em;
  background: linear-gradient(160deg, #fff 30%, rgba(200,180,255,.5));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  margin-bottom: 1.4rem; position: relative; z-index: 1;
}

.hero__role {
  font-family: var(--ff-mono); font-size: clamp(.95rem, 2vw, 1.25rem);
  color: var(--muted); margin-bottom: 2.8rem; min-height: 2em; z-index: 1;
}
.cursor { background: var(--grd); -webkit-background-clip: text; -webkit-text-fill-color: transparent; animation: blink .9s step-end infinite; }
@keyframes blink { 0%,100%{ opacity:1; } 50%{ opacity:0; } }

.hero__cta {
  display: inline-flex; align-items: center; gap: .6rem;
  font-weight: 700; font-size: .95rem;
  background: var(--grd); color: #fff;
  padding: .85rem 2rem; border-radius: 100px;
  position: relative; z-index: 1;
  transition: transform .2s, box-shadow .2s;
}
.hero__cta:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(168,85,247,.4); }

.hero__scroll {
  position: absolute; bottom: 2.5rem; right: 5%;
  font-family: var(--ff-mono); font-size: .7rem; color: var(--muted);
  writing-mode: vertical-rl; letter-spacing: .2em; text-transform: uppercase; opacity: .4;
}

/* ── MARQUEE ────────────────────────────────────────────────────────────────── */
.marquee-wrap {
  overflow: hidden; padding: 1rem 0;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  background: var(--bg2);
}
.marquee { display: flex; gap: 1.5rem; animation: marquee 22s linear infinite; width: max-content; }
.marquee span { font-family: var(--ff-mono); font-size: .82rem; color: var(--muted); white-space: nowrap; }
.marquee .sep { background: var(--grd); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ── SECTIONS ───────────────────────────────────────────────────────────────── */
.section { padding: 7rem 0; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 5%; }

/* ── ABOUT ──────────────────────────────────────────────────────────────────── */
.about-grid {
  display: grid; grid-template-columns: 180px 1fr 260px; gap: 3rem; align-items: start;
  border-top: 1px solid var(--border); padding-top: 3rem;
}
.about-grid__label { font-family: var(--ff-mono); font-size: .78rem; color: var(--muted); padding-top: .3rem; }
.about-grid__text p { font-size: 1.15rem; line-height: 1.75; color: rgba(238,238,255,.65); max-width: 480px; }
.about-grid__stats { display: flex; flex-direction: column; gap: 2rem; border-left: 1px solid var(--border); padding-left: 2.5rem; }

.big-stat__num {
  display: block; font-size: 3.8rem; font-weight: 700; line-height: 1;
  font-family: var(--ff-mono);
  background: var(--grd); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.big-stat__label { font-size: .8rem; color: var(--muted); font-family: var(--ff-mono); }

/* ── PROJECTS HEADER ────────────────────────────────────────────────────────── */
.projects-header {
  display: flex; align-items: center; justify-content: space-between;
  border-top: 1px solid var(--border); padding-top: 2rem; margin-bottom: 2.5rem;
  flex-wrap: wrap; gap: 1rem;
}
.projects-header__label { font-family: var(--ff-mono); font-size: .78rem; color: var(--muted); }

.filter-bar { display: flex; gap: .4rem; flex-wrap: wrap; }
.filter-btn {
  padding: .3rem .9rem; border-radius: 100px;
  font-family: var(--ff-mono); font-size: .78rem; cursor: pointer;
  border: 1px solid var(--border); background: transparent; color: var(--muted);
  transition: all .2s;
}
.filter-btn:hover { border-color: var(--a1); color: var(--a1); }
.filter-btn.active {
  background: var(--grd); border-color: transparent; color: #fff;
}

/* ── BENTO GRID ─────────────────────────────────────────────────────────────── */
.bento {
  display: grid; grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 270px; gap: 1.2rem;
}

.bento-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 1.5rem; position: relative; overflow: hidden;
  transition: border-color .3s, transform .25s, box-shadow .25s;
}

/* gradient glow border on hover */
.bento-card::before {
  content: '';
  position: absolute; inset: 0; border-radius: var(--r);
  padding: 1px;
  background: var(--grd);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .3s;
  pointer-events: none;
}
.bento-card:hover::before { opacity: 1; }
.bento-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(168,85,247,.12);
}

/* big emoji bg */
.bento-card::after {
  content: attr(data-emoji);
  position: absolute; bottom: -8px; right: -8px;
  font-size: 7rem; opacity: .06; pointer-events: none; user-select: none;
  transition: opacity .3s, transform .3s;
}
.bento-card:hover::after { opacity: .12; transform: scale(1.08) rotate(-6deg); }

.bento-card.hidden { display: none; }

.bento-card.reveal { opacity: 0; transform: translateY(24px); }
.bento-card.reveal.visible {
  opacity: 1; transform: translateY(0);
  transition: opacity .5s ease, transform .5s ease;
}

.bento-card__top { display: flex; align-items: flex-start; justify-content: space-between; }
.bento-card__emoji { font-size: 2rem; }
.bento-card__tag {
  font-family: var(--ff-mono); font-size: .7rem; color: var(--muted);
  border: 1px solid var(--border); padding: .12rem .5rem;
  border-radius: 4px; text-transform: uppercase; letter-spacing: .08em;
}

.bento-card__body h3 { font-size: 1rem; font-weight: 700; margin-bottom: .35rem; line-height: 1.25; }
.bento-card__body p { font-size: .82rem; color: var(--muted); line-height: 1.55; }

.bento-card__footer { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.bento-card__stack { display: flex; flex-wrap: wrap; gap: .3rem; }
.bento-card__stack span {
  font-family: var(--ff-mono); font-size: .7rem;
  background: rgba(168,85,247,.1); color: var(--a1);
  padding: .1rem .45rem; border-radius: 4px;
}

.bento-card__links { display: flex; gap: .4rem; flex-shrink: 0; }
.bento-card__links a {
  width: 30px; height: 30px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); font-family: var(--ff-mono); font-size: .78rem;
  color: var(--muted); transition: all .2s;
}
.bento-card__links a:hover { border-color: var(--a1); color: var(--a1); }

/* ── CONTACT ────────────────────────────────────────────────────────────────── */
.contact-block {
  display: grid; grid-template-columns: 1fr 1.4fr; gap: 5rem; align-items: start;
  border-top: 1px solid var(--border); padding-top: 3rem;
}
.contact-block__label { font-family: var(--ff-mono); font-size: .78rem; color: var(--muted); display: block; margin-bottom: 1.5rem; }
.contact-block__heading {
  font-size: clamp(2.2rem, 4.5vw, 3.6rem); font-weight: 700;
  line-height: 1.05; letter-spacing: -.02em; margin-bottom: 2.5rem;
}

.socials { display: flex; gap: .6rem; }
.soc {
  width: 42px; height: 42px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); color: var(--muted); transition: all .2s;
}
.soc:hover { border-color: var(--a1); color: var(--a1); box-shadow: 0 0 16px rgba(168,85,247,.2); }
.soc svg { width: 20px; height: 20px; }

/* floating-label inputs */
.cf-group { position: relative; margin-bottom: 1.1rem; }
.cf-group input,
.cf-group textarea {
  width: 100%; padding: 1.1rem 1rem .55rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; color: var(--text);
  font-family: var(--ff); font-size: .9rem;
  transition: border-color .2s; resize: vertical;
}
.cf-group input:focus,
.cf-group textarea:focus { outline: none; border-color: var(--a1); }
.cf-group label {
  position: absolute; left: 1rem; top: .85rem;
  font-size: .84rem; color: var(--muted);
  pointer-events: none; transition: .2s;
}
.cf-group input:focus ~ label,
.cf-group input:not(:placeholder-shown) ~ label,
.cf-group textarea:focus ~ label,
.cf-group textarea:not(:placeholder-shown) ~ label {
  top: .28rem; font-size: .68rem; color: var(--a1);
}

.cf-submit {
  display: flex; align-items: center; gap: .6rem;
  padding: .9rem 2rem; border-radius: 100px;
  font-family: var(--ff); font-size: .95rem; font-weight: 700;
  cursor: pointer; border: none;
  background: var(--grd); color: #fff;
  transition: transform .2s, box-shadow .2s, opacity .2s;
}
.cf-submit:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(168,85,247,.35); }
.cf-submit:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }

/* ── TOAST ──────────────────────────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 2rem; left: 50%; translate: -50% 12px;
  padding: .7rem 1.6rem; border-radius: 100px;
  font-family: var(--ff-mono); font-size: .82rem;
  opacity: 0; pointer-events: none; z-index: 999; transition: all .3s;
}
.toast.ok    { opacity: 1; translate: -50% 0; background: var(--grd); color: #fff; }
.toast.error { opacity: 1; translate: -50% 0; background: #ef4444; color: #fff; }

/* ── FOOTER ─────────────────────────────────────────────────────────────────── */
.footer {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.5rem 5%; border-top: 1px solid var(--border);
  font-family: var(--ff-mono); font-size: .75rem; color: var(--muted);
}

/* ── RESPONSIVE ─────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .about-grid__stats { flex-direction: row; border-left: none; padding-left: 0; border-top: 1px solid var(--border); padding-top: 2rem; }
  .bento { grid-template-columns: repeat(2,1fr); }
  .contact-block { grid-template-columns: 1fr; gap: 2.5rem; }
}

@media (max-width: 600px) {
  .nav__links { display: none; }
  .nav__burger { display: flex; }
  .nav__links.open {
    display: flex; flex-direction: column; gap: 1.2rem;
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    background: rgba(5,5,15,.97); padding: 2rem 5%;
    border-bottom: 1px solid var(--border);
  }
  .bento { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .bento-card { min-height: 210px; }
  .about-grid__stats { flex-direction: column; }
  .footer { flex-direction: column; gap: .5rem; text-align: center; }
}
