/* ============================================================
   Brand tokens (Mariete palette: near-black surfaces, white text,
   signature yellow accent)
   ============================================================ */
:root {
  --bg: #080808;
  --bg-alt: #0d0d0d;
  --surface: #111111;
  --surface-2: #171717;
  --border: #242424;
  --border-strong: #303030;
  --text: #ffffff;
  --text-muted: #a0a0a0;
  --text-dim: #6b6b6b;
  --accent: #ffe311;
  --accent-ink: #080808;
  --ok: #1ebb52;

  --font-display: "Funnel Display", system-ui, sans-serif;
  --font-sans: "Funnel Sans", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --radius: 14px;
  --radius-sm: 9px;
  --wrap: 1140px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: var(--accent-ink); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: #3f3f3f; }

a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
svg { display: block; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }

/* ============================================================
   Nav
   ============================================================ */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background .3s var(--ease), border-color .3s var(--ease), backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(8, 8, 8, .82);
  backdrop-filter: blur(14px) saturate(160%);
  border-bottom-color: var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: -0.03em;
}
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }

.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a {
  font-size: 14px;
  color: var(--text-muted);
  transition: color .2s var(--ease);
}
.nav-links a:hover { color: var(--text); }
.nav-cta {
  color: var(--text) !important;
  border: 1px solid var(--border-strong);
  padding: 7px 16px;
  border-radius: 99px;
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.nav-cta:hover { border-color: var(--accent); background: rgba(255, 227, 17, .07); }

/* ============================================================
   Hero
   ============================================================ */
.hero { position: relative; padding: 168px 0 104px; overflow: hidden; }
.hero-glow {
  position: absolute;
  top: -320px; left: 50%;
  transform: translateX(-50%);
  width: 1000px; height: 700px;
  background: radial-gradient(circle at 50% 50%, rgba(255, 227, 17, .13), transparent 62%);
  pointer-events: none;
  filter: blur(20px);
}
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  gap: 64px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: var(--text-muted);
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 6px 14px 6px 11px;
  border-radius: 99px;
  margin-bottom: 26px;
}
.dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(30, 187, 82, .18);
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(30, 187, 82, .18); }
  50% { box-shadow: 0 0 0 6px rgba(30, 187, 82, .05); }
}

.hero h1 {
  font-size: clamp(2.4rem, 5.2vw, 3.9rem);
  line-height: 1.06;
  letter-spacing: -0.035em;
  margin-bottom: 22px;
}
.hero h1 em {
  font-style: normal;
  color: var(--accent);
  position: relative;
  white-space: nowrap;
}
.lede {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 46ch;
  line-height: 1.7;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 34px 0 46px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-sans);
  font-size: 14.5px;
  font-weight: 500;
  padding: 12px 22px;
  border-radius: 99px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .18s var(--ease), background .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.btn svg { width: 17px; height: 17px; }
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px -8px rgba(255, 227, 17, .45);
}
.btn-ghost {
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--text-dim); background: var(--surface); transform: translateY(-2px); }

.hero-stats {
  display: flex;
  gap: 44px;
  margin: 0;
  padding-top: 30px;
  border-top: 1px solid var(--border);
}
.hero-stats dt {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--text);
}
.hero-stats dd { margin: 2px 0 0; font-size: 13px; color: var(--text-dim); }

/* Terminal panel */
.hero-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  overflow: hidden;
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .9);
}
.panel-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 15px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, .015);
}
.tl { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); }
.panel-title {
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-dim);
}
.panel-body {
  margin: 0;
  padding: 20px 18px 24px;
  font-family: var(--font-mono);
  font-size: 12.6px;
  line-height: 1.95;
  color: #d4d4d4;
  overflow-x: auto;
}
.c-dim { color: var(--text-dim); }
.c-str { color: #03f7eb; }
.c-ok { color: var(--ok); }
.c-num { color: var(--accent); }
.cursor {
  display: inline-block;
  width: 8px; height: 15px;
  background: var(--accent);
  vertical-align: -2px;
  animation: blink 1.1s steps(2, start) infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* ============================================================
   Sections
   ============================================================ */
.section { padding: 104px 0; border-top: 1px solid var(--border); }
.section-alt { background: var(--bg-alt); }
.section-head { margin-bottom: 54px; max-width: 640px; }
.kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.section-head h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 60px;
  align-items: start;
}
.about-text p { color: var(--text-muted); font-size: 16.5px; line-height: 1.78; }
.about-text p + p { margin-top: 20px; }

.about-facts { display: grid; gap: 14px; }
.about-facts li {
  display: flex;
  gap: 15px;
  align-items: flex-start;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  transition: border-color .22s var(--ease), transform .22s var(--ease);
}
.about-facts li:hover { border-color: var(--border-strong); transform: translateX(3px); }
.about-facts svg { width: 19px; height: 19px; color: var(--accent); flex-shrink: 0; margin-top: 3px; }
.about-facts strong { display: block; font-family: var(--font-display); font-size: 15px; font-weight: 600; }
.about-facts span { font-size: 13.5px; color: var(--text-dim); line-height: 1.5; }

/* Work */
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.card {
  display: flex;
  flex-direction: column;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color .25s var(--ease), transform .25s var(--ease), background .25s var(--ease);
}
.card:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
  background: var(--surface-2);
}
.card-feature { grid-column: 1 / -1; }
.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(255, 227, 17, .09);
  border: 1px solid rgba(255, 227, 17, .2);
  padding: 4px 10px;
  border-radius: 99px;
}
.year { font-family: var(--font-mono); font-size: 12px; color: var(--text-dim); }
.card h3 { font-size: 21px; margin-bottom: 12px; letter-spacing: -0.025em; }
.card p { color: var(--text-muted); font-size: 15px; line-height: 1.72; }

.metrics {
  display: flex;
  gap: 40px;
  margin: 24px 0 4px;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.metrics li { display: flex; flex-direction: column; }
.metrics strong {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--accent);
}
.metrics span { font-size: 12.5px; color: var(--text-dim); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 22px; }
.chips span {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-muted);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .02);
  padding: 4px 11px;
  border-radius: 6px;
}

/* Stack */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 34px;
}
.stack-col h4 {
  font-size: 13px;
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.stack-col li {
  font-size: 15px;
  color: var(--text-muted);
  padding: 5px 0;
  transition: color .18s var(--ease);
}
.stack-col li:hover { color: var(--text); }
.muted { color: var(--text-dim); font-size: 13px; }

/* Contact */
.section-contact { background: var(--bg-alt); }
.contact-inner {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 60px;
  align-items: center;
}
.contact-inner h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin-bottom: 18px;
}
.contact-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 22px; }
.socials { display: flex; gap: 10px; }
.socials a {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-muted);
  background: var(--surface);
  transition: color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.socials a:hover { color: var(--accent); border-color: var(--border-strong); transform: translateY(-2px); }
.socials svg { width: 18px; height: 18px; }

/* Footer */
.footer { border-top: 1px solid var(--border); padding: 30px 0; }
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 13.5px;
  color: var(--text-dim);
}

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 980px) {
  .hero-inner, .about-grid, .contact-inner { grid-template-columns: 1fr; gap: 44px; }
  .hero { padding: 140px 0 80px; }
  .stack-grid { grid-template-columns: repeat(2, 1fr); gap: 30px; }
  .hero-panel { max-width: 560px; }
}
@media (max-width: 720px) {
  .wrap { padding: 0 20px; }
  .nav-links { gap: 18px; }
  .nav-links a:not(.nav-cta) { display: none; }
  .section { padding: 76px 0; }
  .work-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 28px; }
  .hero-stats dt { font-size: 22px; }
  .metrics { gap: 24px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 460px) {
  .stack-grid { grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; justify-content: center; }
}

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