/* =========================================================
   Britzem — Kristen Britz personal site
   Clean & editorial · Stacksy brand tokens
   ========================================================= */

:root {
  /* Ink scale */
  --ink: #1a1f2b;
  --ink-2: #2d3340;
  --ink-3: #4a5160;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #ffffff;
  --bg-soft: #f7f8fb;
  --bg-dark: #0f1320;

  /* Brand accents */
  --purple: #a85fbf;
  --blue: #5b7dd9;
  --teal: #3fb8c4;
  --green: #7bc85f;
  --lime: #c5d86d;
  --grad: linear-gradient(135deg, #a85fbf 0%, #5b7dd9 35%, #3fb8c4 65%, #7bc85f 100%);

  /* System */
  --radius: 14px;
  --radius-lg: 22px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --container: 1180px;
  --nav-h: 72px;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 24px; }
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.muted { color: var(--muted); }
.sep { color: var(--line); margin-inline: .5rem; }

/* ---------- Scroll progress ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: var(--grad); z-index: 1000; transition: width .1s linear;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  font-weight: 600; font-size: .98rem; line-height: 1;
  padding: 14px 22px; border-radius: 100px; cursor: pointer;
  border: 1px solid transparent; transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease), color .2s;
  will-change: transform;
}
.btn--lg { padding: 17px 28px; font-size: 1.05rem; }
.btn--primary {
  color: #fff; position: relative; background: var(--bg-dark);
}
.btn--primary::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background: var(--grad); opacity: 0; transition: opacity .3s var(--ease); z-index: 0;
}
.btn--primary > * { position: relative; z-index: 1; }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px -10px rgba(91,125,217,.6); }
.btn--primary:hover::before { opacity: 1; }
.btn--ghost {
  color: var(--ink); background: transparent; border-color: var(--line);
}
.btn--ghost:hover { transform: translateY(-2px); border-color: var(--ink); background: var(--bg-soft); }

/* ---------- Navigation ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  height: var(--nav-h);
  background: rgba(255,255,255,0);
  transition: background .3s var(--ease), box-shadow .3s var(--ease), backdrop-filter .3s;
}
.nav.is-scrolled {
  background: rgba(255,255,255,.8);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  box-shadow: 0 1px 0 var(--line);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 100%; }

.brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 800; font-size: 1.15rem; letter-spacing: -.02em; }
.brand__mark {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  background: var(--bg-dark); color: #fff; font-weight: 800; font-size: 1.1rem;
  position: relative; overflow: hidden;
}
.brand__mark::after {
  content: 'B'; position: absolute; inset: 0; display: grid; place-items: center;
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent; font-weight: 800;
}

.nav__links { display: flex; align-items: center; gap: 2rem; }
.nav__links a { font-size: .96rem; font-weight: 500; color: var(--ink-2); position: relative; transition: color .2s; }
.nav__links a:not(.nav__cta)::after {
  content: ''; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
  background: var(--grad); transition: width .25s var(--ease);
}
.nav__links a:not(.nav__cta):hover { color: var(--ink); }
.nav__links a:not(.nav__cta):hover::after { width: 100%; }
.nav__cta {
  padding: 9px 18px; border-radius: 100px; background: var(--bg-dark); color: #fff !important;
  transition: transform .2s var(--ease), box-shadow .2s;
}
.nav__cta:hover { transform: translateY(-1px); box-shadow: 0 8px 20px -8px rgba(15,19,32,.5); }

.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav__toggle span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .3s var(--ease), opacity .2s; }
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh; display: flex; align-items: center;
  padding-top: var(--nav-h); overflow: hidden;
  background: radial-gradient(120% 90% at 80% -10%, #f3f1fb 0%, var(--bg) 45%);
}
.hero__bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.orb {
  position: absolute; border-radius: 50%; filter: blur(60px); opacity: .5;
  animation: float 14s ease-in-out infinite;
}
.orb--1 { width: 460px; height: 460px; top: -120px; right: -80px;
  background: radial-gradient(circle, rgba(168,95,191,.5), transparent 70%); }
.orb--2 { width: 420px; height: 420px; bottom: -140px; left: -100px;
  background: radial-gradient(circle, rgba(63,184,196,.45), transparent 70%); animation-delay: -7s; }
@keyframes float { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(20px,-30px) scale(1.08); } }
.grid-overlay {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(110% 90% at 50% 0%, #000 25%, transparent 70%);
  mask-image: radial-gradient(110% 90% at 50% 0%, #000 25%, transparent 70%);
  opacity: .5;
}
.hero__inner { position: relative; z-index: 1; padding-block: 4rem; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .82fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero__content { max-width: 640px; }
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: .6rem; font-size: .9rem; font-weight: 600;
  color: var(--ink-2); background: var(--bg); border: 1px solid var(--line);
  padding: 8px 16px; border-radius: 100px; margin-bottom: 1.6rem; box-shadow: 0 1px 2px rgba(0,0,0,.03);
}
.hero__eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(123,200,95,.6); animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(123,200,95,.55); } 70% { box-shadow: 0 0 0 10px rgba(123,200,95,0); } 100% { box-shadow: 0 0 0 0 rgba(123,200,95,0); } }
.hero__title { font-size: clamp(2.7rem, 5.6vw, 4.7rem); line-height: 1.03; letter-spacing: -.035em; font-weight: 800; margin-bottom: 1.3rem; }
.hero__lede { font-size: clamp(1.05rem, 1.6vw, 1.28rem); color: var(--ink-3); max-width: 560px; margin-bottom: 1.8rem; }
.hero__lede strong { color: var(--ink); font-weight: 700; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 2.4rem; }
.hero__stats { display: flex; flex-wrap: wrap; gap: 2.6rem; }
.hero__stats div { display: flex; flex-direction: column; }
.hero__stats dt { font-size: 2.4rem; font-weight: 800; letter-spacing: -.03em; line-height: 1;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero__stats dd { font-size: .92rem; color: var(--muted); margin-top: .35rem; }
/* Hero photo */
.hero__media { position: relative; justify-self: end; width: 100%; max-width: 440px; }
.hero__photo { position: relative; border-radius: var(--radius-lg); padding: 8px; background: var(--grad); box-shadow: 0 30px 70px -28px rgba(91,125,217,.55); transform: rotate(1.4deg); transition: transform .5s var(--ease); }
.hero__photo:hover { transform: rotate(0deg) translateY(-4px); }
.hero__photo img { border-radius: 16px; width: 100%; height: auto; display: block; background: var(--bg-soft); }
.hero__photo-badge { position: absolute; left: 50%; bottom: -16px; transform: translateX(-50%); white-space: nowrap;
  font-size: .82rem; font-weight: 600; color: var(--ink); background: var(--bg); border: 1px solid var(--line);
  padding: 8px 16px; border-radius: 100px; box-shadow: 0 10px 24px -12px rgba(26,31,43,.3); }

.hero__scroll { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 1;
  width: 26px; height: 42px; border: 2px solid var(--line); border-radius: 100px; display: grid; place-items: start center; padding-top: 7px; }
.hero__scroll span { width: 4px; height: 8px; border-radius: 4px; background: var(--ink-3); animation: scrolldot 1.8s infinite; }
@keyframes scrolldot { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 80% { opacity: 0; transform: translateY(10px); } 100% { opacity: 0; } }

/* ---------- Marquee ---------- */
.marquee { border-block: 1px solid var(--line); background: var(--bg-soft); padding-block: 1.1rem; overflow: hidden; }
.marquee__track { display: flex; align-items: center; gap: 1.5rem; width: max-content; animation: scrollx 32s linear infinite; }
.marquee__track span { font-family: var(--mono); font-size: 1.1rem; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.marquee__track .sep { color: var(--teal); }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes scrollx { to { transform: translateX(-50%); } }

/* ---------- Sections base ---------- */
.section { padding-block: clamp(5rem, 10vw, 8rem); }
.section__kicker { font-family: var(--mono); font-size: .85rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--teal); margin-bottom: 1rem; }
.section__title { font-size: clamp(2rem, 4.5vw, 3.4rem); line-height: 1.08; letter-spacing: -.03em; font-weight: 800; }
.section__sub { font-size: 1.15rem; color: var(--ink-3); margin-top: 1.2rem; max-width: 620px; }
.section__head { margin-bottom: 3.4rem; max-width: 760px; }
.lead { font-size: 1.3rem; color: var(--ink-2); line-height: 1.5; }

.grid-2 { display: grid; grid-template-columns: minmax(0,.85fr) minmax(0,1.15fr); gap: clamp(2rem, 6vw, 6rem); }

/* ---------- About ---------- */
.about { background: var(--bg-soft); }
.about__sticky { position: sticky; top: calc(var(--nav-h) + 2rem); align-self: start; }
.about__body p { margin-bottom: 1.4rem; color: var(--ink-3); }
.about__body p strong { color: var(--ink); }
.about__body a { border-bottom: 2px solid var(--teal); font-weight: 600; color: var(--ink-2); transition: color .2s; }
.about__body a:hover { color: var(--teal); }
.about__chips { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 2rem; }
.about__chips li { font-size: .9rem; font-weight: 500; padding: 8px 16px; border-radius: 100px; background: var(--bg); border: 1px solid var(--line); color: var(--ink-2); }

/* ---------- Work ---------- */
.work__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.4rem; }
.card {
  position: relative; display: flex; flex-direction: column; gap: .8rem;
  padding: 2rem; border-radius: var(--radius-lg); background: var(--bg);
  border: 1px solid var(--line); overflow: hidden;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
}
.card::before {
  content: ''; position: absolute; left: 0; top: 0; height: 4px; width: 100%;
  background: var(--grad); transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease);
}
.card:not(.card--static):hover { transform: translateY(-6px); box-shadow: 0 24px 50px -24px rgba(26,31,43,.28); border-color: transparent; }
.card:not(.card--static):hover::before { transform: scaleX(1); }
.card__top { display: flex; align-items: center; justify-content: space-between; }
.card__tag { font-family: var(--mono); font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); padding: 5px 10px; border-radius: 100px; background: var(--bg-soft); border: 1px solid var(--line); }
.card__arrow { font-size: 1.3rem; color: var(--ink-3); transition: transform .3s var(--ease), color .3s; }
.card:hover .card__arrow { transform: translate(3px,-3px); color: var(--teal); }
.card h3 { font-size: 1.5rem; font-weight: 700; letter-spacing: -.02em; margin-top: .3rem; }
.card p { font-size: .98rem; color: var(--ink-3); }
.card--static { cursor: default; }

/* ---------- Approach ---------- */
.approach__list { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.6rem; counter-reset: step; }
.approach__list li { position: relative; padding: 2rem 1.8rem; border-radius: var(--radius-lg); background: var(--bg-soft); border: 1px solid var(--line); transition: transform .3s var(--ease), background .3s; }
.approach__list li:hover { transform: translateY(-4px); background: var(--bg); box-shadow: 0 18px 40px -22px rgba(26,31,43,.25); }
.approach__num { font-family: var(--mono); font-size: 2.6rem; font-weight: 500; line-height: 1; letter-spacing: -.04em;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; opacity: .9; }
.approach__list h3 { font-size: 1.25rem; font-weight: 700; margin-block: 1rem .6rem; letter-spacing: -.01em; }
.approach__list p { font-size: .98rem; color: var(--ink-3); }

/* ---------- Stacksy ---------- */
.stacksy { background: var(--bg-dark); color: #fff; position: relative; overflow: hidden; }
.stacksy::before { content: ''; position: absolute; width: 600px; height: 600px; border-radius: 50%; top: -200px; right: -150px;
  background: radial-gradient(circle, rgba(91,125,217,.35), transparent 70%); filter: blur(40px); }
.stacksy__inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.stacksy .section__kicker { color: var(--lime); }
.stacksy .section__title { color: #fff; }
.stacksy .lead { color: #c7cbd6; margin-block: 1.4rem; }
.stacksy__services { display: grid; gap: .8rem; margin-bottom: 2rem; }
.stacksy__services li { position: relative; padding-left: 1.8rem; color: #d7dae3; font-size: 1.02rem; }
.stacksy__services li::before { content: '→'; position: absolute; left: 0; color: var(--teal); font-weight: 700; }
.stacksy__awards { display: flex; flex-wrap: wrap; gap: .8rem; margin-bottom: 2rem; }
.badge { font-size: .88rem; font-weight: 600; padding: 8px 16px; border-radius: 100px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); }
.stacksy .btn--primary { background: #fff; color: var(--bg-dark); }
.stacksy .btn--primary:hover > * { color: #fff; }

/* code panel */
.stacksy__code { border-radius: var(--radius-lg); background: #161b2c; border: 1px solid rgba(255,255,255,.1); overflow: hidden; box-shadow: 0 30px 70px -30px rgba(0,0,0,.6); }
.code__chrome { display: flex; gap: .5rem; padding: 14px 18px; border-bottom: 1px solid rgba(255,255,255,.08); }
.code__chrome span { width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,.18); }
.code__chrome span:nth-child(1) { background: #ff5f57; }
.code__chrome span:nth-child(2) { background: #febc2e; }
.code__chrome span:nth-child(3) { background: #28c840; }
.stacksy__code pre { margin: 0; padding: 22px; overflow-x: auto; }
.stacksy__code code { font-family: var(--mono); font-size: .92rem; line-height: 1.8; color: #c7cbd6; white-space: pre; }
.c-key { color: #c792ea; } .c-fn { color: #82aaff; } .c-var { color: #f0f4ff; } .c-str { color: #c3e88d; } .c-num { color: #f78c6c; }

/* ---------- Contact ---------- */
.contact { text-align: center; background: radial-gradient(120% 90% at 50% 120%, #f1f3fb 0%, var(--bg) 55%); }
.contact__inner { max-width: 760px; margin-inline: auto; }
.contact .section__kicker { display: inline-block; }
.contact__title { font-size: clamp(2.4rem, 6vw, 4rem); line-height: 1.05; letter-spacing: -.03em; font-weight: 800; margin-bottom: 1.2rem; }
.contact__sub { font-size: 1.2rem; color: var(--ink-3); margin-bottom: 2.4rem; }
.contact__actions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; margin-bottom: 2.2rem; }
.contact__details { font-size: 1rem; color: var(--ink-2); }
.contact__details a { font-weight: 500; transition: color .2s; }
.contact__details a:hover { color: var(--teal); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding-block: 2.4rem; background: var(--bg-soft); }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.brand--footer { font-size: 1.05rem; }
.footer__tag { font-size: .95rem; color: var(--ink-2); }
.footer__copy { font-size: .88rem; }

/* ---------- Reveal animations ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero { min-height: auto; }
  .hero__inner { grid-template-columns: 1fr; padding-block: 3rem 4rem; }
  .hero__content { max-width: none; order: 2; }
  .hero__media { order: 1; justify-self: start; max-width: 320px; margin-bottom: 1rem; }
  .hero__photo { transform: rotate(0deg); }
  .hero__scroll { display: none; }
}
@media (max-width: 900px) {
  .grid-2 { grid-template-columns: 1fr; }
  .about__sticky { position: static; }
  .stacksy__inner { grid-template-columns: 1fr; }
  .stacksy__code { order: 2; }
}
@media (max-width: 720px) {
  body { font-size: 17px; }
  .nav__links { position: fixed; inset: var(--nav-h) 0 auto 0; flex-direction: column; align-items: flex-start; gap: 0;
    background: rgba(255,255,255,.97); backdrop-filter: blur(14px); padding: 1rem 24px 1.6rem;
    box-shadow: 0 12px 30px -16px rgba(0,0,0,.25); transform: translateY(-120%); transition: transform .35s var(--ease); }
  .nav__links.is-open { transform: translateY(0); }
  .nav__links a { width: 100%; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav__links a:not(.nav__cta)::after { display: none; }
  .nav__cta { margin-top: .8rem; text-align: center; justify-content: center; }
  .nav__toggle { display: flex; }
  .hero__stats { gap: 1.6rem 2rem; }
  .hero__stats dt { font-size: 2rem; }
}
