/* ============================================================
   Gene — Portfolio
   Dark navy/charcoal · gold accent · high-end 3D + motion
   ============================================================ */

:root {
  --bg:        #0a0e1a;
  --bg-2:      #0e1424;
  --panel:     #121a2e;
  --panel-2:   #16203a;
  --line:      rgba(212, 175, 55, 0.14);
  --text:      #eef1f8;
  --muted:     #9aa6c0;
  --gold:      #d4af37;
  --gold-2:    #f4d77a;
  --gold-deep: #b8901f;
  --radius:    18px;
  --maxw:      1180px;
  --ease:      cubic-bezier(0.16, 1, 0.3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  cursor: none;
}

@media (hover: none) { body { cursor: auto; } }

h1, h2, h3, .nav__brand { font-family: "Sora", sans-serif; line-height: 1.08; }

a { color: inherit; text-decoration: none; }

::selection { background: var(--gold); color: #1a1305; }

/* Animated background mesh ----------------------------------- */
body::before {
  content: "";
  position: fixed;
  inset: -20%;
  z-index: -2;
  background:
    radial-gradient(40% 40% at 15% 20%, rgba(212,175,55,0.10), transparent 70%),
    radial-gradient(45% 45% at 85% 15%, rgba(80,120,255,0.08), transparent 70%),
    radial-gradient(50% 50% at 75% 85%, rgba(212,175,55,0.07), transparent 70%);
  filter: blur(20px);
  animation: meshShift 22s ease-in-out infinite alternate;
}
@keyframes meshShift {
  0%   { transform: translate3d(0,0,0) scale(1); }
  50%  { transform: translate3d(3%, -2%, 0) scale(1.08); }
  100% { transform: translate3d(-3%, 3%, 0) scale(1.04); }
}
body::after { /* fine grain */
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  opacity: 0.5;
}

/* Custom cursor ---------------------------------------------- */
.cursor, .cursor-dot {
  position: fixed; top: 0; left: 0; z-index: 9999; pointer-events: none;
  border-radius: 50%; transform: translate(-50%, -50%);
  mix-blend-mode: screen;
}
.cursor {
  width: 38px; height: 38px;
  border: 1.5px solid rgba(212,175,55,0.6);
  transition: width .25s var(--ease), height .25s var(--ease),
              background .25s var(--ease), border-color .25s var(--ease);
}
.cursor-dot { width: 6px; height: 6px; background: var(--gold-2); }
.cursor.is-hover {
  width: 64px; height: 64px;
  background: rgba(212,175,55,0.12);
  border-color: var(--gold);
}
@media (hover: none) { .cursor, .cursor-dot { display: none; } }

/* Scroll progress -------------------------------------------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-2));
  z-index: 1000; box-shadow: 0 0 14px rgba(212,175,55,0.7);
}

/* Nav -------------------------------------------------------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px clamp(20px, 5vw, 60px);
  transition: background .4s var(--ease), padding .4s var(--ease),
              backdrop-filter .4s var(--ease), border-color .4s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(10,14,26,0.72);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line);
  padding-top: 14px; padding-bottom: 14px;
}
.nav__brand { font-size: 1.4rem; font-weight: 800; letter-spacing: -0.02em; }
.nav__brand span { color: var(--gold); }
.nav__links { display: flex; gap: 34px; }
.nav__links a {
  font-size: 0.95rem; font-weight: 500; color: var(--muted);
  position: relative; transition: color .25s var(--ease);
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
  background: var(--gold); transition: width .3s var(--ease);
}
.nav__links a:hover { color: var(--text); }
.nav__links a:hover::after { width: 100%; }

.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: none; }
.nav__toggle span { width: 26px; height: 2px; background: var(--text); transition: .3s var(--ease); }

/* Hero ------------------------------------------------------- */
.hero {
  position: relative; min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 120px clamp(20px, 5vw, 60px) 80px;
  overflow: hidden;
}
.hero__3d { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; opacity: 0.9; }
.hero__glow {
  position: absolute; width: 700px; height: 700px; border-radius: 50%;
  background: radial-gradient(circle, rgba(212,175,55,0.18), transparent 60%);
  filter: blur(40px); top: 50%; left: 50%; transform: translate(-50%, -50%);
  z-index: 0; animation: pulse 6s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity:.6; transform:translate(-50%,-50%) scale(1);} 50%{opacity:1; transform:translate(-50%,-50%) scale(1.12);} }

.hero__inner { position: relative; z-index: 3; max-width: 920px; }
.hero__eyebrow {
  display: inline-block; font-size: 0.8rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 26px; padding: 8px 18px;
  border: 1px solid var(--line); border-radius: 999px;
  background: rgba(212,175,55,0.05); backdrop-filter: blur(4px);
}
.hero__title {
  font-size: clamp(2.6rem, 6.5vw, 5.4rem); font-weight: 800; letter-spacing: -0.03em;
  margin-bottom: 26px;
}
.grad {
  background: linear-gradient(120deg, var(--gold-2), var(--gold-deep) 60%, var(--gold-2));
  background-size: 200% auto; -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; animation: shimmer 5s linear infinite;
}
@keyframes shimmer { to { background-position: 200% center; } }
.hero__sub { font-size: clamp(1.05rem, 1.7vw, 1.3rem); color: var(--muted); max-width: 660px; margin: 0 auto 38px; }

.hero__cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.hero__stats {
  display: flex; gap: clamp(24px, 5vw, 64px); justify-content: center; flex-wrap: wrap;
  margin-top: 64px; padding-top: 36px; border-top: 1px solid var(--line);
}
.hero__stats strong { display: block; font-family: "Sora"; font-size: 2.4rem; color: var(--gold); font-weight: 700; }
.hero__stats span { font-size: 0.85rem; color: var(--muted); }

.hero__scroll {
  position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); z-index: 3;
  font-size: 1.4rem; color: var(--gold); animation: bob 2s ease-in-out infinite;
}
@keyframes bob { 0%,100%{transform:translate(-50%,0);} 50%{transform:translate(-50%,10px);} }

/* Buttons ---------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 30px; border-radius: 999px; font-weight: 600; font-size: 0.98rem;
  cursor: none; transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s var(--ease);
  will-change: transform; border: 1px solid transparent;
}
.btn--gold {
  background: linear-gradient(120deg, var(--gold-2), var(--gold-deep));
  color: #1a1305; box-shadow: 0 10px 30px -8px rgba(212,175,55,0.6);
}
.btn--gold:hover { box-shadow: 0 16px 40px -8px rgba(212,175,55,0.8); }
.btn--ghost { border-color: var(--line); color: var(--text); background: rgba(255,255,255,0.02); }
.btn--ghost:hover { border-color: var(--gold); background: rgba(212,175,55,0.08); }
.btn--lg { padding: 18px 40px; font-size: 1.1rem; }

/* Sections --------------------------------------------------- */
.section { max-width: var(--maxw); margin: 0 auto; padding: clamp(80px, 12vh, 150px) clamp(20px, 5vw, 40px); }
.section__head { margin-bottom: 56px; }
.kicker { display: block; font-size: 0.82rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); margin-bottom: 14px; }
.section__head h2 { font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 700; letter-spacing: -0.02em; }

.about { display: grid; gap: 22px; max-width: 760px; font-size: 1.15rem; color: var(--muted); }
.about strong { color: var(--text); }

/* Filters ---------------------------------------------------- */
.filters { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 40px; }
.filter {
  padding: 10px 22px; border-radius: 999px; border: 1px solid var(--line);
  background: transparent; color: var(--muted); font-size: 0.92rem; font-weight: 500;
  cursor: none; transition: all .3s var(--ease); font-family: inherit;
}
.filter:hover { color: var(--text); border-color: var(--gold); }
.filter.is-active {
  background: linear-gradient(120deg, var(--gold-2), var(--gold-deep));
  color: #1a1305; border-color: transparent;
}

/* Work grid -------------------------------------------------- */
.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 24px;
  perspective: 1400px;
}
.card {
  position: relative; background: linear-gradient(160deg, var(--panel), var(--bg-2));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 30px;
  overflow: hidden; transform-style: preserve-3d; will-change: transform;
  transition: transform .12s var(--ease), border-color .4s var(--ease), box-shadow .4s var(--ease);
}
.card::before { /* gold sheen following tilt */
  content: ""; position: absolute; inset: 0; border-radius: inherit; opacity: 0;
  background: radial-gradient(220px circle at var(--mx,50%) var(--my,50%), rgba(212,175,55,0.16), transparent 60%);
  transition: opacity .4s var(--ease); pointer-events: none;
}
.card:hover { border-color: rgba(212,175,55,0.45); box-shadow: 0 30px 60px -30px rgba(0,0,0,0.8); }
.card:hover::before { opacity: 1; }
.card__tag {
  display: inline-block; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 5px 12px; border-radius: 999px; margin-bottom: 18px; transform: translateZ(40px);
  border: 1px solid var(--line); color: var(--gold);
}
.card__icon { font-size: 1.7rem; margin-bottom: 14px; transform: translateZ(60px); display: block; }
.card h3 { font-size: 1.3rem; margin-bottom: 10px; transform: translateZ(50px); }
.card p { color: var(--muted); font-size: 0.98rem; transform: translateZ(30px); }
.card__meta { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px; transform: translateZ(30px); }
.card__meta span {
  font-size: 0.74rem; padding: 4px 10px; border-radius: 6px;
  background: rgba(255,255,255,0.04); color: var(--muted); border: 1px solid rgba(255,255,255,0.05);
}
.card.is-hidden { display: none; }

/* Stack ------------------------------------------------------ */
.stack { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap: 22px; }
.stack__group { border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; background: var(--bg-2); }
.stack__group h4 { font-family: "Sora"; font-size: 1rem; color: var(--gold); margin-bottom: 16px; letter-spacing: 0.02em; }
.chips { display: flex; flex-wrap: wrap; gap: 9px; }
.chip {
  font-size: 0.85rem; padding: 7px 14px; border-radius: 999px;
  background: rgba(255,255,255,0.03); border: 1px solid var(--line); color: var(--text);
  transition: transform .25s var(--ease), background .25s var(--ease);
}
.chip:hover { transform: translateY(-3px); background: rgba(212,175,55,0.1); }

/* Contact ---------------------------------------------------- */
.section--contact { text-align: center; }
.contact { max-width: 720px; margin: 0 auto; }
.contact h2 { font-size: clamp(2rem, 4.5vw, 3.4rem); margin: 8px 0 18px; }
.contact p { color: var(--muted); margin-bottom: 30px; font-size: 1.1rem; }
.contact__links { display: flex; gap: 28px; justify-content: center; margin-top: 34px; }
.contact__links a { color: var(--muted); font-weight: 500; position: relative; transition: color .25s var(--ease); }
.contact__links a:hover { color: var(--gold); }

/* Footer ----------------------------------------------------- */
.footer { text-align: center; padding: 40px 20px; color: var(--muted); font-size: 0.85rem; border-top: 1px solid var(--line); }

/* Reveal animation ------------------------------------------- */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.card { opacity: 0; transform: translateY(40px); transition: opacity .7s var(--ease), transform .7s var(--ease), border-color .4s, box-shadow .4s; }
.card.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .card { opacity: 1; transform: none; }
}

/* Responsive ------------------------------------------------- */
@media (max-width: 720px) {
  .nav__links {
    position: fixed; inset: 0 0 0 auto; width: min(78vw, 320px);
    flex-direction: column; gap: 26px; padding: 100px 36px;
    background: rgba(12,17,30,0.96); backdrop-filter: blur(16px);
    transform: translateX(100%); transition: transform .4s var(--ease);
    border-left: 1px solid var(--line);
  }
  .nav__links.is-open { transform: translateX(0); }
  .nav__toggle { display: flex; }
  .nav__toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav__toggle.is-open span:nth-child(2) { opacity: 0; }
  .nav__toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .grid { grid-template-columns: 1fr; }
}
