/* ============================================================
   Benjamin Ogden — dark & bold redesign
   ============================================================ */
:root {
  --bg: #08090c;
  --bg-2: #0e1015;
  --panel: #121419;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --ink: #f4f5f7;
  --muted: #8b90a0;
  --dim: #5b6070;
  --acc: #7c5cff;
  --acc-2: #29e0c8;
  --acc-3: #ff5c8a;
  --grad: linear-gradient(105deg, #29e0c8 0%, #7c5cff 55%, #ff5c8a 100%);
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --sans: "Space Grotesk", system-ui, sans-serif;
  --max: 1180px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

::selection { background: var(--acc); color: #fff; }

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

.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Ambient background ---------- */
.grid-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 100% 70% at 50% 0%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 100% 70% at 50% 0%, #000 30%, transparent 80%);
  opacity: 0.7;
}
.glow {
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.45;
  pointer-events: none;
}
.glow-a { width: 620px; height: 620px; top: -220px; left: -140px;
  background: radial-gradient(circle, #7c5cff, transparent 70%); }
.glow-b { width: 560px; height: 560px; top: 240px; right: -180px;
  background: radial-gradient(circle, #29e0c8, transparent 70%); opacity: 0.32; }

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px clamp(20px, 5vw, 56px);
  transition: background .3s, backdrop-filter .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(8, 9, 12, 0.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand {
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 15px;
  display: flex;
  gap: 6px;
}
.brand span { color: var(--acc-2); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
}
.nav-links a { color: var(--muted); transition: color .2s; }
.nav-links a:hover { color: var(--ink); }
.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--acc-2);
  padding: 6px 12px;
  border: 1px solid var(--line-2);
  border-radius: 100px;
}
.status i {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--acc-2);
  box-shadow: 0 0 0 0 rgba(41, 224, 200, 0.6);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(41, 224, 200, 0.5); }
  70% { box-shadow: 0 0 0 8px rgba(41, 224, 200, 0); }
  100% { box-shadow: 0 0 0 0 rgba(41, 224, 200, 0); }
}
.menu-btn { display: none; background: none; border: 0; cursor: pointer;
  flex-direction: column; gap: 5px; }
.menu-btn span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; }

/* ---------- Hero ---------- */
.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(140px, 22vh, 220px) clamp(20px, 5vw, 56px) clamp(80px, 12vh, 140px);
}
.eyebrow {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin-bottom: 28px;
}
.eyebrow em { color: var(--acc); font-style: normal; }
.hero h1 {
  font-size: clamp(48px, 9vw, 118px);
  line-height: 0.98;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 34px;
}
.hero h1 .line { display: block; }
.hero h1 em { font-style: italic; font-weight: 400; color: var(--muted); }
.hero-sub {
  max-width: 640px;
  font-size: clamp(16px, 2vw, 19px);
  color: var(--muted);
  margin-bottom: 40px;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 26px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 15px;
  transition: transform .2s, box-shadow .25s, background .25s, border-color .25s;
}
.btn-primary {
  background: var(--grad);
  color: #0a0a0d;
  background-size: 160% 160%;
  box-shadow: 0 8px 30px rgba(124, 92, 255, 0.35);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 14px 40px rgba(124, 92, 255, 0.5); }
.btn-primary span { transition: transform .2s; }
.btn-primary:hover span { transform: translateX(4px); }
.btn-ghost { border: 1px solid var(--line-2); color: var(--ink); }
.btn-ghost:hover { border-color: var(--acc-2); color: var(--acc-2); transform: translateY(-3px); }

.scroll-hint {
  margin-top: 90px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--dim);
}
.scroll-hint i {
  width: 40px; height: 1px; background: var(--dim); position: relative; overflow: hidden;
}
.scroll-hint i::after {
  content: ""; position: absolute; left: 0; top: 0; width: 16px; height: 1px;
  background: var(--acc-2); animation: slide 1.8s infinite;
}
@keyframes slide { 0%{transform:translateX(-16px)} 100%{transform:translateX(40px)} }

/* ---------- Sections ---------- */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(70px, 11vh, 130px) clamp(20px, 5vw, 56px);
  border-top: 1px solid var(--line);
}
.section-head { margin-bottom: 56px; }
.index {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--acc);
  display: block;
  margin-bottom: 16px;
}
.section-head h2 {
  font-size: clamp(32px, 5.5vw, 60px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.02;
}

/* ---------- Work ---------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 230px;
  padding: 26px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  transition: transform .3s, border-color .3s, background .3s;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(500px circle at var(--mx, 50%) var(--my, 0%),
              rgba(124, 92, 255, 0.14), transparent 45%);
  opacity: 0;
  transition: opacity .3s;
}
.card:hover { transform: translateY(-6px); border-color: var(--line-2); background: #15181f; }
.card:hover::before { opacity: 1; }
.card-top { display: flex; align-items: center; justify-content: space-between; position: relative; }
.card-num { font-family: var(--mono); font-size: 13px; color: var(--dim); }
.card-tag {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-align: right;
}
.card h3 {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-top: auto;
  position: relative;
}
.card-go {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--acc-2);
  position: relative;
  transition: transform .25s;
}
.card:hover .card-go { transform: translateX(5px); }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  align-items: start;
}
.about-copy p { color: var(--muted); font-size: 17px; margin-bottom: 20px; max-width: 56ch; }
.about-copy strong { color: var(--ink); font-weight: 600; }
.stack {
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg-2);
}
.stack li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
}
.stack li:last-child { border-bottom: 0; }
.stack span { font-family: var(--mono); font-size: 13px; color: var(--dim); }
.stack b { font-weight: 600; font-size: 15px; }
.stack li:hover { background: var(--panel); }
.stack li:hover b { color: var(--acc-2); }

/* ---------- Contact ---------- */
.contact { text-align: left; }
.contact-sub { max-width: 560px; color: var(--muted); font-size: 18px; margin: -20px 0 40px; }
.contact-links { display: flex; flex-wrap: wrap; gap: 14px; }
.clink {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  border: 1px solid var(--line-2);
  border-radius: 100px;
  font-size: 16px;
  transition: transform .2s, border-color .25s, background .25s;
}
.clink .ic {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--acc);
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 30px; height: 30px;
  display: grid; place-items: center;
}
.clink:hover { transform: translateY(-3px); border-color: var(--acc); background: var(--panel); }

/* ---------- Footer ---------- */
.foot {
  max-width: var(--max);
  margin: 0 auto;
  padding: 40px clamp(20px, 5vw, 56px) 60px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--dim);
}

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1);
}
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .work-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 620px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    position: fixed;
    top: 66px; left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    padding: 24px clamp(20px,5vw,56px);
    background: rgba(8,9,12,.96);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
  }
  .menu-btn { display: flex; }
  .work-grid { grid-template-columns: 1fr; }
  .foot { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
