:root {
  --bg: #070707;
  --bg2: #0b0b0d;
  --surface: #101014;
  --surface2: #141418;
  --line: #29292f;
  --text: #f4f4f5;
  --muted: #9a9aa3;
  --red: #ff1f25;
  --red2: #b9090e;
  --green: #53f6ac;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px),
    var(--bg);
  background-size: 56px 56px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 78% 28%, rgba(255,31,37,.09), transparent 26%),
    radial-gradient(circle at 20% 90%, rgba(255,31,37,.04), transparent 30%);
  z-index: 0;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .035;
  z-index: 99;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 120 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
}

a { color: inherit; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 76px;
  padding: 0 clamp(22px, 5vw, 72px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(7,7,7,.78);
  border-bottom: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 900;
  letter-spacing: .08em;
}

.brand img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  border-radius: 8px;
  filter: drop-shadow(0 0 10px rgba(255,31,37,.35));
}

.brand .dot { color: var(--red); }

nav {
  display: flex;
  gap: 28px;
}

nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: .95rem;
  font-weight: 700;
}

nav a:hover { color: var(--text); }

main, footer { position: relative; z-index: 1; }

.hero {
  min-height: calc(100vh - 76px);
  padding: clamp(70px, 10vh, 130px) clamp(22px, 7vw, 110px);
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  align-items: center;
  gap: 50px;
  border-bottom: 1px solid var(--line);
}

.kicker, .section-index, .eyebrow {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  text-transform: uppercase;
  letter-spacing: .15em;
}

.kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: .78rem;
  margin-bottom: 20px;
}

.pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(83,246,172,.6);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(83,246,172,.5); }
  70% { box-shadow: 0 0 0 10px rgba(83,246,172,0); }
  100% { box-shadow: 0 0 0 0 rgba(83,246,172,0); }
}

h1 {
  margin: 0;
  font-size: clamp(4.3rem, 10vw, 9rem);
  line-height: .83;
  letter-spacing: -.065em;
  font-weight: 950;
}

h1 span {
  color: transparent;
  -webkit-text-stroke: 2px var(--red);
  text-shadow: 0 0 30px rgba(255,31,37,.18);
}

.hero-text {
  max-width: 720px;
  margin: 34px 0 0;
  font-size: clamp(1rem, 1.45vw, 1.25rem);
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 20px;
  border: 1px solid var(--line);
  border-radius: 9px;
  text-decoration: none;
  font-weight: 800;
  transition: .2s ease;
}

.btn-primary {
  color: white;
  border-color: var(--red);
  background: linear-gradient(180deg, #ff3036, #d80d13);
  box-shadow: 0 10px 30px rgba(255,31,37,.16);
}

.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 15px 40px rgba(255,31,37,.24); }
.btn-ghost:hover { border-color: #555; background: #111; }

.statusline {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 42px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: #777780;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .72rem;
}

.statusline b { color: #c7c7cb; font-weight: 600; margin-right: 7px; }

.hero-mark {
  position: relative;
  min-height: 560px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.hero-mark img {
  width: min(86%, 610px);
  aspect-ratio: 1;
  object-fit: contain;
  position: relative;
  z-index: 2;
  mix-blend-mode: screen;
  filter:
    contrast(1.12)
    saturate(1.2)
    drop-shadow(0 0 14px rgba(255,31,37,.3))
    drop-shadow(0 0 50px rgba(255,31,37,.16));
}

.logo-glow {
  position: absolute;
  width: 72%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,31,37,.16), rgba(255,31,37,.05) 40%, transparent 70%);
  filter: blur(20px);
}

.scanline {
  position: absolute;
  z-index: 3;
  left: 12%;
  right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--red), transparent);
  box-shadow: 0 0 18px rgba(255,31,37,.65);
  animation: scan 5s ease-in-out infinite;
  opacity: .45;
}

@keyframes scan {
  0%,100% { top: 24%; }
  50% { top: 76%; }
}

.corner {
  position: absolute;
  width: 44px;
  height: 44px;
  opacity: .4;
}
.corner-a { left: 3%; top: 8%; border-left: 1px solid var(--red); border-top: 1px solid var(--red); }
.corner-b { right: 3%; top: 8%; border-right: 1px solid var(--red); border-top: 1px solid var(--red); }
.corner-c { left: 3%; bottom: 8%; border-left: 1px solid var(--red); border-bottom: 1px solid var(--red); }
.corner-d { right: 3%; bottom: 8%; border-right: 1px solid var(--red); border-bottom: 1px solid var(--red); }

.ticker {
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #0a0a0c;
  white-space: nowrap;
}

.ticker-track {
  display: inline-flex;
  align-items: center;
  gap: 22px;
  min-width: max-content;
  padding: 14px 0;
  animation: ticker 30s linear infinite;
  color: #75757d;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .75rem;
  letter-spacing: .12em;
}

.ticker-track i {
  color: var(--red);
  font-style: normal;
}

@keyframes ticker { to { transform: translateX(-50%); } }

.section {
  padding: 110px clamp(22px, 7vw, 110px);
  border-bottom: 1px solid var(--line);
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 50px;
  align-items: end;
  margin-bottom: 46px;
}

.section-head > p {
  max-width: 520px;
  color: var(--muted);
}

.section-index {
  color: var(--red);
  font-size: .75rem;
}

h2 {
  margin: 10px 0 0;
  font-size: clamp(2.4rem, 5vw, 5rem);
  line-height: 1;
  letter-spacing: -.045em;
}

.projects {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.project {
  min-height: 330px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, rgba(20,20,24,.95), rgba(12,12,14,.95));
  border: 1px solid var(--line);
  border-radius: 14px;
  position: relative;
  overflow: hidden;
  transition: transform .2s ease, border-color .2s ease;
}

.project::after {
  content: "";
  position: absolute;
  width: 190px;
  height: 190px;
  right: -70px;
  bottom: -90px;
  background: radial-gradient(circle, rgba(255,31,37,.12), transparent 70%);
  pointer-events: none;
}

.project:hover {
  transform: translateY(-4px);
  border-color: #494950;
}

.project-featured {
  grid-column: 1 / -1;
  min-height: 390px;
  background:
    linear-gradient(120deg, rgba(255,31,37,.08), transparent 45%),
    linear-gradient(180deg, rgba(20,20,24,.98), rgba(12,12,14,.98));
}

.project-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.status {
  display: inline-flex;
  align-items: center;
  width: max-content;
  padding: 5px 8px;
  border: 1px solid #34343a;
  border-radius: 5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .65rem;
  letter-spacing: .1em;
  color: #b5b5bb;
}

.status.active { color: var(--green); border-color: rgba(83,246,172,.25); background: rgba(83,246,172,.05); }
.status.experiment { color: #ffb454; border-color: rgba(255,180,84,.25); }
.status.maintained { color: #aeb8ff; border-color: rgba(174,184,255,.2); }

.project-no {
  color: #55555d;
  font: .8rem ui-monospace, monospace;
}

.eyebrow {
  margin: 34px 0 8px;
  color: #777780;
  font-size: .67rem;
}

.project h3 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 3rem);
  letter-spacing: -.035em;
}

.project p {
  max-width: 720px;
  color: var(--muted);
}

.project-body {
  min-height: 280px;
  display: flex;
  justify-content: space-between;
  gap: 40px;
  align-items: end;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 22px;
}

.chips span {
  padding: 6px 9px;
  border-radius: 6px;
  background: #19191d;
  border: 1px solid #2a2a30;
  color: #aaaab1;
  font: .7rem ui-monospace, monospace;
}

.project-link {
  flex: 0 0 auto;
  text-decoration: none;
  border: 1px solid var(--red);
  padding: 12px 16px;
  border-radius: 8px;
  font-weight: 800;
}

.project-link:hover { background: var(--red); }

.text-link {
  margin-top: 18px;
  color: #d7d7db;
  text-decoration: none;
  font-weight: 700;
}

.split {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: 8vw;
}

.about-copy {
  max-width: 760px;
}

.about-copy .lead {
  color: #ededf0;
  font-size: 1.25rem;
}

.about-copy > p:not(.lead) { color: var(--muted); }

.terminal {
  margin-top: 40px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #08080a;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,.3);
}

.terminal-bar {
  height: 42px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: #111114;
}

.terminal-bar > span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #3a3a40;
}

.terminal-bar > span:first-child { background: #ff5a5f; }
.terminal-bar > span:nth-child(2) { background: #ffbc4b; }
.terminal-bar > span:nth-child(3) { background: #4bd17b; }

.terminal-bar small {
  margin-left: 8px;
  color: #66666e;
  font-family: ui-monospace, monospace;
}

pre {
  margin: 0;
  padding: 26px;
  overflow-x: auto;
  color: #c4c4ca;
  font: .86rem/1.9 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

pre span { color: var(--green); }

.stack-grid {
  margin-top: 42px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.stack-grid > div {
  min-height: 150px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(12,12,14,.72);
}

.stack-grid > div:nth-child(even) { border-right: 0; }
.stack-grid > div:nth-last-child(-n+2) { border-bottom: 0; }

.stack-grid b {
  font-size: 1.4rem;
}

.stack-grid span {
  color: var(--muted);
  font-family: ui-monospace, monospace;
  font-size: .8rem;
}

footer {
  padding: 42px clamp(22px, 7vw, 110px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
  background: #060607;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 13px;
}

.footer-brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 8px;
}

.footer-brand div {
  display: flex;
  flex-direction: column;
}

.footer-brand span,
.footer-meta {
  color: #73737a;
  font-size: .78rem;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 22px;
}

.online {
  color: var(--green);
}

.online i {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--green);
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-mark {
    min-height: 360px;
  }

  .hero-mark img { width: min(75%, 460px); }

  .projects { grid-template-columns: 1fr; }
  .project-featured { grid-column: auto; }

  .split { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .topbar {
    height: 68px;
    padding: 0 18px;
  }

  nav { gap: 14px; }
  nav a { font-size: .8rem; }

  .brand span { font-size: .9rem; }
  .brand img { width: 30px; height: 30px; }

  .hero {
    min-height: auto;
    padding: 70px 20px 50px;
  }

  h1 { font-size: clamp(4rem, 23vw, 6.4rem); }

  .hero-mark { min-height: 300px; }
  .statusline { gap: 12px; }

  .section { padding: 76px 20px; }

  .section-head {
    display: block;
  }

  .section-head > p { margin-top: 20px; }

  .project {
    padding: 22px;
    min-height: 310px;
  }

  .project-body {
    display: block;
  }

  .project-link {
    display: inline-block;
    margin-top: 26px;
  }

  .stack-grid { grid-template-columns: 1fr; }

  .stack-grid > div,
  .stack-grid > div:nth-child(even),
  .stack-grid > div:nth-last-child(-n+2) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .stack-grid > div:last-child { border-bottom: 0; }

  footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-meta { justify-content: flex-start; }
}
