:root {
  --bg: #08090a;
  --bg-2: #0b0d0e;
  --surface: #0f1112;
  --surface-2: #131617;
  --surface-3: #171a1b;

  --text: #dfddd3;
  --text-bright: #f0eee6;
  --muted: #85867f;
  --muted-2: #5d5f5b;

  --red: #ff4935;
  --red-dim: #9e3026;
  --cyan: #37cfc5;
  --cyan-dim: #1e7771;
  --yellow: #d5c64e;
  --magenta: #c25c86;

  --line: rgba(223, 221, 211, .12);
  --line-strong: rgba(223, 221, 211, .22);
  --max: 1220px;
  --pad: clamp(22px, 4vw, 56px);
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
  margin: 0;
  color: var(--text);
  font-family: var(--sans);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::selection { background: var(--red); color: #090909; }

a { color: inherit; text-decoration: none; }
code { font-family: var(--mono); color: var(--text-bright); }

.atmosphere,
.atmosphere::before,
.atmosphere::after {
  position: fixed;
  inset: 0;
  pointer-events: none;
}
.atmosphere {
  z-index: 100;
  opacity: .20;
  background-image:
    repeating-linear-gradient(0deg, rgba(255,255,255,.018) 0, rgba(255,255,255,.018) 1px, transparent 1px, transparent 4px),
    radial-gradient(circle at 20% 15%, rgba(255, 71, 49, .035), transparent 24%),
    radial-gradient(circle at 82% 25%, rgba(50, 206, 196, .03), transparent 27%);
  mix-blend-mode: screen;
}
.atmosphere::before {
  content: "";
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.36'/%3E%3C/svg%3E");
  opacity: .18;
}
.atmosphere::after {
  content: "";
  background:
    linear-gradient(90deg, transparent 0%, rgba(255,73,53,.025) 31%, transparent 48%, rgba(55,207,197,.025) 73%, transparent 100%);
  mix-blend-mode: screen;
}

.skip {
  position: fixed;
  left: 14px;
  top: 14px;
  z-index: 200;
  padding: 10px 12px;
  background: var(--red);
  color: #0a0a0a;
  font: 600 10px/1 var(--mono);
  transform: translateY(-180%);
}
.skip:focus { transform: translateY(0); }

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: 66px;
  padding: 0 var(--pad);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 9, 10, .82);
  backdrop-filter: blur(15px) saturate(.8);
}
.brand,
.topbar nav,
.github {
  font: 600 9px/1 var(--mono);
  letter-spacing: .11em;
  text-transform: lowercase;
}
.brand { color: var(--text-bright); }
.topbar nav { display: flex; gap: 26px; color: var(--muted); }
.topbar nav a { padding: 8px 0; border-bottom: 1px solid transparent; transition: .2s ease; }
.topbar nav a:hover,
.topbar nav a:focus-visible { color: var(--text-bright); border-color: var(--red); outline: none; }
.github { justify-self: end; color: var(--red); }
.github:hover { text-shadow: 0 0 16px rgba(255,73,53,.35); }

.hero {
  position: relative;
  min-height: calc(100vh - 66px);
  display: grid;
  align-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 46%, rgba(255,74,53,.05), transparent 19%),
    radial-gradient(circle at 50% 44%, rgba(55,207,197,.05), transparent 34%),
    linear-gradient(180deg, #090a0b 0%, #08090a 62%, #060707 100%);
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 0, rgba(255,255,255,.025) 50%, transparent 100%),
    repeating-linear-gradient(90deg, transparent 0, transparent 110px, rgba(255,255,255,.018) 111px, transparent 112px);
  opacity: .45;
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 28%;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.65));
  pointer-events: none;
}
.hero-glow {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(circle at 50% 38%, rgba(255,73,53,.055), transparent 20%),
    radial-gradient(circle at 48% 42%, rgba(55,207,197,.045), transparent 34%);
  filter: blur(30px);
  pointer-events: none;
}
#quasar {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}
.hero-inner {
  position: relative;
  z-index: 3;
  width: min(var(--max), calc(100% - (2 * var(--pad))));
  margin: 0 auto;
  padding: clamp(100px, 11vw, 150px) 0 clamp(82px, 9vw, 120px);
  text-align: center;
}
.hero-copy { max-width: 960px; margin: 0 auto; }
.overline,
.section-kicker,
.project-meta,
.case-top,
.tools {
  font-family: var(--mono);
  letter-spacing: .11em;
  text-transform: lowercase;
}
.overline {
  margin: 0 0 24px;
  color: var(--cyan);
  font-size: 9px;
  line-height: 1.4;
  font-weight: 600;
}
.hero h1 {
  margin: 0;
  color: var(--text-bright);
  font-family: var(--display);
  font-size: clamp(96px, 15vw, 190px);
  line-height: .72;
  letter-spacing: -.035em;
  font-weight: 600;
  text-transform: lowercase;
  text-wrap: balance;
}
.hero-subtitle {
  margin: 28px 0 0;
  color: var(--red);
  font-family: var(--display);
  font-size: clamp(24px, 3.2vw, 42px);
  line-height: .95;
  letter-spacing: .015em;
  font-weight: 500;
  text-transform: lowercase;
}
.intro {
  max-width: 650px;
  margin: 26px auto 0;
  color: #aaa9a1;
  font-size: clamp(14px, 1.5vw, 17px);
  line-height: 1.8;
}
.hero-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 34px;
}
.hero-links a,
.contact-links a {
  position: relative;
  color: var(--text);
  font: 600 9px/1 var(--mono);
  letter-spacing: .08em;
  padding-bottom: 7px;
}
.hero-links a::after,
.contact-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--red-dim);
  transform-origin: left;
  transition: transform .2s ease, background .2s ease;
}
.hero-links a:hover,
.contact-links a:hover { color: var(--text-bright); }
.hero-links a:hover::after,
.contact-links a:hover::after { background: var(--red); transform: scaleX(1.12); }
.hero-facts {
  max-width: 720px;
  margin: 76px auto 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.hero-facts div {
  min-height: 74px;
  padding: 18px 20px;
  border-left: 1px solid var(--line);
}
.hero-facts div:first-child { border-left: 0; }
.hero-facts span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font: 600 8px/1 var(--mono);
  letter-spacing: .1em;
  text-transform: lowercase;
}
.hero-facts strong {
  color: var(--text);
  font-size: 11px;
  line-height: 1.4;
  font-weight: 600;
}
.hero-floor {
  position: absolute;
  left: 4%;
  right: 4%;
  bottom: 28px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,73,53,.35) 25%, rgba(255,255,255,.12) 50%, rgba(55,207,197,.28) 75%, transparent);
  opacity: .72;
  z-index: 3;
}

section:not(.hero) { position: relative; padding: clamp(90px, 10vw, 140px) var(--pad); }
.section-wrap { max-width: var(--max); margin: 0 auto; }
.rust-section { background: linear-gradient(180deg, #0a0c0d, #0b0d0e); }
.contrib-section { background: #090b0c; }
.projects-section { background: linear-gradient(180deg, #0a0c0d, #090a0b); }
.debug-section { background: #08090a; }

.section-kicker {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
}
.section-kicker span:first-child { color: var(--red); }
.section-kicker::after {
  content: "";
  width: 52px;
  height: 1px;
  background: var(--line-strong);
}
.section-head {
  margin-bottom: 56px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, .6fr);
  gap: 60px;
  align-items: end;
}
.section-head h2 {
  margin: 0;
  color: var(--text-bright);
  font-family: var(--display);
  font-size: clamp(58px, 7vw, 98px);
  line-height: .82;
  letter-spacing: -.025em;
  font-weight: 600;
  text-transform: lowercase;
}
.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

.case-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line-strong);
  border-left: 1px solid var(--line);
}
.case {
  position: relative;
  min-height: 360px;
  padding: 28px 28px 88px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.008);
  transition: background .25s ease, box-shadow .25s ease;
}
.case:hover {
  background: rgba(255,255,255,.018);
  box-shadow: inset 0 1px 0 rgba(255,73,53,.12);
}
.case-wide { grid-column: 1 / -1; min-height: 300px; }
.case::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  width: 72px;
  height: 2px;
  background: var(--cyan);
}
.case-magenta::before { background: var(--magenta); }
.case-amber::before { background: var(--yellow); }
.case-top {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  font-size: 8px;
  line-height: 1;
  font-weight: 600;
}
.case-top span { color: var(--muted); }
.case-top em { color: var(--cyan); font-style: normal; }
.case-magenta .case-top em { color: var(--magenta); }
.case-amber .case-top em { color: var(--yellow); }
.case h3 {
  margin: 0 0 16px;
  max-width: 900px;
  color: var(--text-bright);
  font-family: var(--display);
  font-size: clamp(34px, 4vw, 56px);
  line-height: .92;
  letter-spacing: -.012em;
  font-weight: 500;
  text-transform: lowercase;
}
.case p {
  margin: 0;
  max-width: 840px;
  color: #a0a19a;
  font-size: 13px;
  line-height: 1.82;
}
.case-links {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 25px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.case-links a {
  color: var(--muted);
  font: 600 8px/1 var(--mono);
  padding-bottom: 4px;
  border-bottom: 1px solid var(--line-strong);
  transition: color .2s ease, border-color .2s ease;
}
.case-links a:hover { color: var(--text-bright); border-color: var(--red); }
.trace {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font: 500 9px/1.6 var(--mono);
}
.trace b { color: var(--red); }

.contribution-head { grid-template-columns: minmax(0, 1fr) auto; }
.contribution-head > div:first-child {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 360px);
  gap: 60px;
  align-items: end;
}
.counts {
  display: grid;
  grid-template-columns: auto auto;
  gap: 4px 10px;
  align-items: end;
  padding-left: 24px;
  border-left: 1px solid var(--line);
}
.counts strong {
  font-family: var(--display);
  font-size: 55px;
  line-height: .75;
  font-weight: 500;
  color: var(--text-bright);
}
.counts span {
  align-self: end;
  padding-bottom: 4px;
  color: var(--muted);
  font: 600 8px/1.2 var(--mono);
}
.contribution-list { border-top: 1px solid var(--line-strong); }
.contribution-list a {
  min-height: 66px;
  padding: 0 12px;
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) 90px;
  gap: 18px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  transition: background .16s ease;
}
.contribution-list a:hover { background: rgba(255,73,53,.03); }
.contribution-list span { color: var(--red); font: 600 9px/1 var(--mono); }
.contribution-list strong { color: var(--text); font-size: 13px; line-height: 1.45; font-weight: 600; }
.contribution-list em {
  color: var(--muted-2);
  font: 600 8px/1 var(--mono);
  letter-spacing: .06em;
  text-align: right;
  text-transform: lowercase;
  font-style: normal;
}
.contribution-list .active em { color: var(--red); }

.featured-project {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  padding: 34px 30px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 35px;
  align-items: end;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.008);
  transition: background .2s ease, border-color .2s ease;
}
.featured-project:hover { background: rgba(255,255,255,.018); border-top-color: var(--red-dim); }
.project-meta {
  margin: 0 0 14px;
  color: var(--yellow);
  font-size: 8px;
  line-height: 1;
  font-weight: 600;
}
.featured-project h3 {
  margin: 0 0 12px;
  max-width: 820px;
  color: var(--text-bright);
  font-family: var(--display);
  font-size: clamp(46px, 5.4vw, 78px);
  line-height: .86;
  letter-spacing: -.018em;
  font-weight: 500;
  text-transform: lowercase;
}
.featured-project p:not(.project-meta) {
  margin: 0;
  max-width: 760px;
  color: #9d9f98;
  font-size: 13px;
  line-height: 1.75;
}
.pipeline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  color: var(--muted);
  font: 600 8px/1 var(--mono);
}
.pipeline span { padding: 7px 8px; border: 1px solid var(--line); }
.pipeline i { width: 11px; height: 1px; background: var(--cyan-dim); }
.project-list {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-left: 1px solid var(--line);
}
.project-list a {
  position: relative;
  min-height: 240px;
  padding: 26px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.005);
  transition: background .2s ease;
}
.project-list a:hover { background: rgba(255,73,53,.025); }
.project-list a::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 32px;
  height: 1px;
  background: var(--red-dim);
  transition: width .2s ease, background .2s ease;
}
.project-list a:hover::before { width: 88px; background: var(--red); }
.project-list span { color: var(--cyan); font: 600 8px/1 var(--mono); letter-spacing: .08em; }
.project-list h3 {
  margin: 80px 0 11px;
  color: var(--text-bright);
  font-family: var(--display);
  font-size: 46px;
  line-height: .9;
  font-weight: 500;
  text-transform: lowercase;
}
.project-list p { margin: 0; color: #979891; font-size: 13px; line-height: 1.65; }

.debug-steps {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line-strong);
}
.debug-steps li {
  min-height: 112px;
  padding: 22px 0;
  display: grid;
  grid-template-columns: 88px minmax(0, 720px);
  gap: 26px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.debug-steps > li > span { color: var(--red); font: 600 9px/1 var(--mono); }
.debug-steps strong {
  display: block;
  color: var(--text-bright);
  font-family: var(--display);
  font-size: 39px;
  line-height: .86;
  font-weight: 500;
  text-transform: lowercase;
}
.debug-steps p { margin: 8px 0 0; color: #979891; font-size: 13px; line-height: 1.6; }
.tools {
  max-width: var(--max);
  margin: 25px auto 0;
  color: var(--muted-2);
  font-size: 8px;
  line-height: 1.7;
  font-weight: 500;
}

.contact {
  padding: clamp(90px, 10vw, 130px) var(--pad);
  background:
    radial-gradient(circle at 85% 25%, rgba(47, 200, 193, .035), transparent 28%),
    radial-gradient(circle at 15% 65%, rgba(255, 73, 53, .04), transparent 30%),
    #0a0c0d;
  border-top: 1px solid var(--line);
}
.contact-inner { display: grid; grid-template-columns: 1fr auto; gap: 30px; align-items: end; }
.contact-inner > p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--red);
  font: 600 9px/1 var(--mono);
  letter-spacing: .12em;
}
.contact h2 {
  margin: 0;
  color: var(--text-bright);
  font-family: var(--display);
  font-size: clamp(62px, 8vw, 112px);
  line-height: .78;
  letter-spacing: -.025em;
  font-weight: 500;
  text-transform: lowercase;
}
.contact-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 18px; }

footer {
  min-height: 66px;
  padding: 0 var(--pad);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  border-top: 1px solid var(--line);
  background: #070809;
  color: var(--muted-2);
  font: 600 8px/1 var(--mono);
  letter-spacing: .06em;
  text-transform: lowercase;
}
footer span:nth-child(2) { text-align: center; }
footer span:last-child { text-align: right; }

@media (max-width: 980px) {
  .topbar { grid-template-columns: 1fr auto; }
  .topbar nav { display: none; }
  .hero-inner { padding-top: 96px; padding-bottom: 88px; }
  .hero-facts { max-width: 620px; }
  .section-head,
  .contribution-head,
  .contribution-head > div:first-child { grid-template-columns: 1fr; }
  .counts { justify-self: start; border-left: 0; padding-left: 0; }
  .case-grid,
  .project-list { grid-template-columns: 1fr; }
  .case-wide { grid-column: auto; }
  .featured-project { grid-template-columns: 1fr; }
  .pipeline { justify-content: flex-start; }
  .contact-inner { grid-template-columns: 1fr; }
  .contact-links { justify-content: flex-start; }
}

@media (max-width: 640px) {
  .github { font-size: 8px; }
  .hero h1 { font-size: clamp(80px, 24vw, 120px); }
  .hero-subtitle { font-size: 27px; }
  .hero-facts { grid-template-columns: 1fr; margin-top: 55px; }
  .hero-facts div { min-height: 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .hero-facts div:last-child { border-bottom: 0; }
  .section-head h2 { font-size: clamp(54px, 17vw, 82px); }
  .section-head { gap: 28px; margin-bottom: 42px; }
  .case { min-height: 430px; }
  .case-wide { min-height: 480px; }
  .case h3 { font-size: 40px; }
  .contribution-list a { grid-template-columns: 66px minmax(0, 1fr); gap: 13px; padding: 13px 7px; }
  .contribution-list em { grid-column: 2; text-align: left; }
  .featured-project { padding: 28px 22px; }
  .featured-project h3 { font-size: 50px; }
  .project-list a { min-height: 220px; }
  .project-list h3 { margin-top: 62px; font-size: 44px; }
  .debug-steps li { grid-template-columns: 48px 1fr; gap: 17px; }
  .debug-steps strong { font-size: 35px; }
  .contact h2 { font-size: 60px; }
  .contact-links { justify-content: flex-start; }
  footer { grid-template-columns: 1fr; gap: 8px; padding-top: 18px; padding-bottom: 18px; }
  footer span:nth-child(2), footer span:last-child { text-align: left; }
}

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