:root {
  --ink: #0c0c0c;
  --ink-soft: #1b1b1b;
  --paper: #f7f3ea;
  --paper-soft: #ece5d9;
  --white: #ffffff;
  --muted: #6f6a61;
  --line: rgba(12, 12, 12, 0.16);
  --line-light: rgba(255, 255, 255, 0.22);
  --green: #c4ff3d;
  --blue: #2d72ff;
  --coral: #ff6b4a;
  --violet: #7a5cff;
  --max: 1220px;
  --gutter: 24px;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

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

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: "Geist", "Inter", "Segoe UI", Arial, sans-serif;
  line-height: 1.45;
}

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

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

img,
svg {
  display: block;
  max-width: 100%;
}

p,
h1,
h2,
h3 {
  margin-top: 0;
}

h1,
h2,
h3,
.brand,
.button,
.eyebrow {
  letter-spacing: 0;
}

.scroll-progress {
  position: fixed;
  inset: 0 auto auto 0;
  z-index: 80;
  width: calc(var(--scroll, 0) * 100%);
  height: 4px;
  background: var(--green);
}

.site-header {
  position: fixed;
  top: 14px;
  left: 50%;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(calc(100% - 32px), var(--max));
  min-height: 58px;
  padding: 8px;
  background: rgba(12, 12, 12, 0.76);
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
  color: var(--white);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
}

.brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  font-weight: 850;
}

.brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  background: var(--green);
  border-radius: 6px;
  color: var(--ink);
  font-size: 0.84rem;
}

.brand-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.nav-links a {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0 13px;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.9rem;
  font-weight: 760;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  outline: 0;
}

.section-shell {
  width: min(calc(100% - (var(--gutter) * 2)), var(--max));
  margin-inline: auto;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: 42px;
  align-items: end;
  min-height: 100svh;
  padding: 116px max(var(--gutter), calc((100vw - var(--max)) / 2)) 28px;
  overflow: hidden;
  background: var(--ink);
  color: var(--white);
}

.hero::before {
  position: absolute;
  inset: auto 0 0;
  height: 38%;
  background: var(--paper);
  content: "";
}

.hero-copy,
.hero-media,
.hero-marquee {
  position: relative;
  z-index: 1;
}

.hero-copy {
  max-width: 720px;
  padding-bottom: 96px;
}

.eyebrow {
  margin-bottom: 16px;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: var(--green);
}

h1 {
  max-width: 780px;
  margin-bottom: 18px;
  font-size: 6.4rem;
  line-height: 0.88;
  text-transform: uppercase;
}

.role-line {
  margin-bottom: 16px;
  color: var(--green);
  font-size: 1.22rem;
  font-weight: 850;
}

.lead {
  max-width: 640px;
  margin-bottom: 28px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 1.05rem;
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 17px;
  border: 1px solid currentColor;
  border-radius: 7px;
  font-weight: 850;
  line-height: 1;
}

.button:focus-visible {
  outline: 3px solid rgba(196, 255, 61, 0.5);
  outline-offset: 3px;
}

.button-primary {
  background: var(--green);
  border-color: var(--green);
  color: var(--ink);
}

.button-secondary {
  background: transparent;
  color: currentColor;
}

.hero-media {
  align-self: center;
  min-width: 0;
  padding-top: 8px;
}

.hero-media-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.hero-media-top span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.76rem;
  font-weight: 820;
  text-transform: uppercase;
}

.hero-media-top strong {
  max-width: 290px;
  text-align: right;
}

.device-frame {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 360px;
  aspect-ratio: 1 / 0.88;
  overflow: hidden;
  background: #151515;
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
}

.device-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.hero-stat-grid div {
  min-width: 0;
  padding: 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
}

.hero-stat-grid strong {
  display: block;
  margin-bottom: 3px;
  font-size: 1rem;
}

.hero-stat-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
}

.hero-marquee {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  overflow: hidden;
  padding: 8px 0 0;
}

.hero-marquee span {
  flex: 0 0 auto;
  padding: 9px 12px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 850;
}

.intro-band {
  display: grid;
  grid-template-columns: minmax(0, 0.58fr) minmax(280px, 0.42fr);
  gap: 44px;
  align-items: end;
  padding: 78px 0 70px;
}

h2 {
  max-width: 860px;
  margin-bottom: 0;
  font-size: 3.8rem;
  line-height: 0.96;
}

.intro-band > p:last-child,
.section-heading p,
.security-copy p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1rem;
}

.work,
.stack,
.security,
.contact {
  padding: 78px 0;
  border-top: 1px solid var(--line);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.68fr) minmax(280px, 0.32fr);
  gap: 28px;
  align-items: end;
  margin-bottom: 28px;
}

.section-heading .eyebrow {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.section-heading h2 {
  grid-column: 1 / 2;
}

.section-heading-compact {
  grid-template-columns: 1fr;
}

.project-wall {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.project-card {
  display: grid;
  grid-column: span 2;
  grid-template-rows: minmax(220px, auto) 1fr;
  min-width: 0;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transform: translateY(var(--lift, 0));
  transform-style: preserve-3d;
  transition: box-shadow 160ms ease, border-color 160ms ease;
}

.project-card:hover {
  border-color: rgba(12, 12, 12, 0.36);
  box-shadow: 0 20px 70px rgba(12, 12, 12, 0.12);
}

.project-card-large {
  grid-column: span 3;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  grid-template-rows: auto;
  min-height: 440px;
}

.project-dark {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--white);
}

.project-coral {
  background: #fff1eb;
}

.project-media {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 230px;
  padding: 18px;
  overflow: hidden;
  background: var(--paper-soft);
}

.project-dark .project-media {
  background: #181818;
}

.project-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.project-media-dashboard img {
  object-fit: cover;
  object-position: left top;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.project-media-device img {
  max-width: 86%;
  max-height: 86%;
}

.project-media-logo img {
  max-width: 74%;
  max-height: 170px;
}

.project-copy {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  min-width: 0;
  padding: 24px;
}

.project-kicker {
  margin-bottom: 10px;
  color: var(--blue);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.project-dark .project-kicker {
  color: var(--green);
}

.project-copy h3 {
  margin-bottom: 12px;
  font-size: 1.85rem;
  line-height: 1;
}

.project-copy p:not(.project-kicker) {
  margin-bottom: 0;
  color: var(--muted);
}

.project-dark .project-copy p:not(.project-kicker) {
  color: rgba(255, 255, 255, 0.7);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-list span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 0 10px;
  background: rgba(12, 12, 12, 0.06);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: currentColor;
  font-size: 0.78rem;
  font-weight: 800;
}

.project-dark .tag-list span {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--line-light);
}

.terminal-window {
  width: min(100%, 330px);
  padding: 18px;
  background: var(--ink);
  border-radius: var(--radius);
  color: var(--green);
  font-family: "Cascadia Mono", "Consolas", monospace;
}

.terminal-window span,
.terminal-window p {
  color: rgba(255, 255, 255, 0.64);
}

.terminal-window strong {
  display: block;
  margin: 20px 0 8px;
  color: var(--white);
  font-size: 1.35rem;
}

.terminal-window i {
  display: block;
  width: 52%;
  height: 8px;
  margin-top: 18px;
  background: var(--green);
  border-radius: 999px;
}

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(36px, 1fr));
  gap: 8px;
  width: min(100%, 330px);
}

.analytics-grid span {
  display: block;
  min-height: 68px;
  background: var(--ink);
  border-radius: 7px;
}

.analytics-grid span:nth-child(2),
.analytics-grid span:nth-child(4) {
  background: var(--blue);
}

.analytics-grid span:nth-child(3),
.analytics-grid span:nth-child(6) {
  background: var(--green);
}

.game-scene {
  position: relative;
  width: min(100%, 320px);
  aspect-ratio: 1.4 / 1;
  overflow: hidden;
  background: #fed6b9;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
}

.game-scene::before {
  position: absolute;
  inset: auto 0 0;
  height: 38%;
  background: #84cda4;
  content: "";
}

.game-scene span {
  position: absolute;
  bottom: 34%;
  width: 42px;
  height: 78px;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 24px 24px 12px 12px;
}

.game-scene span:first-child {
  left: 28%;
}

.game-scene span:nth-child(2) {
  right: 28%;
  background: var(--green);
}

.game-scene i {
  position: absolute;
  left: 34%;
  right: 34%;
  bottom: 32%;
  height: 3px;
  background: var(--ink);
}

.more-work {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.more-work a {
  display: grid;
  gap: 6px;
  min-width: 0;
  min-height: 112px;
  padding: 18px;
  background: var(--ink);
  border-radius: var(--radius);
  color: var(--white);
}

.more-work span {
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.more-work strong {
  align-self: end;
  font-size: 1.08rem;
}

.stack-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.stack-grid article {
  min-width: 0;
  min-height: 260px;
  padding: 22px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.stack-grid span {
  display: inline-flex;
  margin-bottom: 56px;
  color: var(--coral);
  font-weight: 920;
}

.stack-grid h3 {
  margin-bottom: 12px;
  font-size: 1.55rem;
}

.stack-grid p {
  margin-bottom: 0;
  color: var(--muted);
}

.security {
  display: grid;
  grid-template-columns: minmax(0, 0.48fr) minmax(0, 0.52fr);
  gap: 36px;
  align-items: start;
}

.security-board {
  display: grid;
  gap: 8px;
}

.security-board div {
  display: grid;
  grid-template-columns: minmax(120px, 0.34fr) minmax(0, 0.66fr);
  gap: 14px;
  min-height: 78px;
  align-items: center;
  padding: 16px;
  background: var(--ink);
  border-radius: var(--radius);
  color: var(--white);
}

.security-board span {
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.security-board strong {
  font-size: 0.98rem;
}

.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
}

.contact .button-secondary {
  color: var(--ink);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  width: min(calc(100% - (var(--gutter) * 2)), var(--max));
  margin: 0 auto;
  padding: 26px 0 34px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}

@media (max-width: 1100px) {
  h1 {
    font-size: 5.15rem;
  }

  h2 {
    font-size: 3rem;
  }

  .project-card {
    grid-column: span 3;
  }

  .project-card-large {
    grid-column: 1 / -1;
  }

  .stack-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  :root {
    --gutter: 18px;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 104px;
  }

  .hero-copy {
    padding-bottom: 20px;
  }

  .hero::before {
    height: 22%;
  }

  .intro-band,
  .section-heading,
  .security,
  .contact {
    grid-template-columns: 1fr;
  }

  .section-heading h2 {
    grid-column: 1 / -1;
  }

  .project-card,
  .project-card-large {
    grid-column: 1 / -1;
  }

  .more-work {
    grid-template-columns: 1fr;
  }
}

@media (hover: none) {
  .project-card {
    transform: none !important;
  }
}

@media (max-width: 700px) {
  .site-header {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
    width: calc(100% - 20px);
  }

  .nav-links {
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .nav-links a {
    flex: 0 0 auto;
  }

  .hero {
    padding-top: 150px;
  }

  h1 {
    font-size: 3.6rem;
  }

  h2 {
    font-size: 2.25rem;
  }

  .role-line {
    font-size: 1rem;
  }

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

  .project-card-large {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .project-copy h3 {
    font-size: 1.55rem;
  }

  .security-board div {
    grid-template-columns: 1fr;
  }

  .contact-actions,
  .hero-actions {
    width: 100%;
  }

  .button {
    flex: 1 1 100%;
  }

  .site-footer {
    flex-direction: column;
  }
}

@media (max-width: 460px) {
  h1 {
    font-size: 3rem;
  }

  h2 {
    font-size: 2rem;
  }

  .lead,
  .intro-band > p:last-child,
  .section-heading p,
  .security-copy p {
    font-size: 0.96rem;
  }

  .device-frame {
    min-height: 280px;
  }

  .project-media {
    min-height: 190px;
    padding: 14px;
  }

  .project-copy {
    padding: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .project-card {
    transform: none !important;
    transition: none;
  }
}
