:root {
  --black: #0d0d0b;
  --black-2: #141412;
  --bone: #ece9e2;
  --grey: #8a877e;
  --line: rgba(236, 233, 226, 0.14);
  --lime: #d5ff3f;
  --ease: cubic-bezier(0.76, 0, 0.24, 1);
  --ease-out: cubic-bezier(0.19, 1, 0.22, 1);
  --pad: clamp(20px, 4vw, 56px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  font-family: "Inter", system-ui, sans-serif;
  background: var(--black);
  color: var(--bone);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--lime); color: var(--black); }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--black); }
::-webkit-scrollbar-thumb { background: #2e2d28; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #3d3c35; }

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; background: none; border: none; color: inherit; cursor: pointer; }

.mono {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.display {
  font-family: "Bricolage Grotesque", "Inter", sans-serif;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 0.92;
}

.wrap { padding-left: var(--pad); padding-right: var(--pad); }

.grain {
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  z-index: 90;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 220 220' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.72' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 0.9s steps(4) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2%, 3%); }
  50% { transform: translate(3%, -2%); }
  75% { transform: translate(-3%, -3%); }
  100% { transform: translate(2%, 2%); }
}

.preloader {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: var(--black);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: var(--pad);
  transition: transform 0.9s var(--ease);
  animation: pl-auto 0.9s var(--ease) 3s forwards;
}
.preloader.done { transform: translateY(-101%); }
.preloader .pl-count {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 800;
  font-size: clamp(64px, 14vw, 200px);
  line-height: 0.85;
  color: var(--bone);
}
@keyframes pl-auto { to { transform: translateY(-101%); visibility: hidden; } }

.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0; left: 0;
  z-index: 400;
  pointer-events: none;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  display: none;
}
.cursor-dot { width: 6px; height: 6px; background: var(--lime); }
.cursor-ring {
  width: 34px; height: 34px;
  border: 1px solid rgba(236, 233, 226, 0.4);
  transition: width 0.25s ease, height 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
.cursor-ring.on {
  width: 64px; height: 64px;
  border-color: var(--lime);
  background: rgba(213, 255, 63, 0.08);
}
@media (pointer: fine) {
  body.has-cursor .cursor-dot, body.has-cursor .cursor-ring { display: block; }
}

.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px var(--pad);
  mix-blend-mode: difference;
}
.topbar .brand {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #fff;
}
.topbar .brand sup { font-size: 8px; vertical-align: super; }
.topnav { display: flex; gap: 30px; }
.topnav a {
  position: relative;
  color: #fff;
  padding-bottom: 3px;
}
.topnav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: #fff;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease);
}
.topnav a:hover::after { transform: scaleX(1); transform-origin: left; }
.menu-btn { display: none; color: #fff; }

.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--black-2);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--pad);
  gap: 6px;
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.6s var(--ease);
}
.menu-overlay.open { clip-path: inset(0 0 0% 0); }
.menu-overlay a.big {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(38px, 11vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.menu-overlay a.big:active { color: var(--lime); }
.menu-overlay .menu-meta { margin-top: 40px; color: var(--grey); }
.menu-close {
  position: absolute;
  top: 22px; right: var(--pad);
  color: var(--bone);
}

.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 110px var(--pad) 34px;
  position: relative;
}
.hero-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--grey);
  margin-bottom: clamp(24px, 4vh, 48px);
}
.hero-meta .avail { color: var(--bone); display: inline-flex; align-items: center; gap: 8px; }
.hero-meta .avail i {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--lime);
  animation: blink 2.4s ease infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

.hero h1 { font-size: clamp(52px, 11.8vw, 178px); }
.hero h1 .line { display: block; overflow: hidden; }
.hero h1 .line-inner {
  display: block;
  transform: translateY(112%);
  transition: transform 1.1s var(--ease-out);
}
body.ready .hero h1 .line-inner { transform: translateY(0); }
body.ready .hero h1 .line:nth-child(2) .line-inner { transition-delay: 0.08s; }
body.ready .hero h1 .line:nth-child(3) .line-inner { transition-delay: 0.16s; }
.hero h1 .stroke {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--bone);
}

.hero-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: clamp(28px, 5vh, 56px);
}
.hero-bottom .intro {
  max-width: 44ch;
  color: var(--grey);
  font-size: 15.5px;
}
.hero-bottom .intro strong { color: var(--bone); font-weight: 600; }
.hero-bottom .scroll-cue { color: var(--grey); }

.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 16px 0;
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 26s linear infinite;
}
.marquee-track span {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(18px, 2.4vw, 30px);
  letter-spacing: 0.01em;
  white-space: nowrap;
  padding-right: 18px;
  color: var(--bone);
}
.marquee-track span b { color: var(--lime); font-weight: 800; padding-right: 18px; }
@keyframes marquee { to { transform: translateX(-50%); } }

.section { padding: clamp(80px, 13vh, 150px) var(--pad); }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  color: var(--grey);
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
  margin-bottom: clamp(36px, 6vh, 64px);
}
.section-head .n { color: var(--lime); }

.statement {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 600;
  font-size: clamp(26px, 4.4vw, 58px);
  line-height: 1.14;
  letter-spacing: -0.015em;
  max-width: 22ch;
}
.statement .w {
  opacity: 0.14;
  transition: opacity 0.5s ease;
}
.statement.lit .w { opacity: 1; }
.statement .hl { color: var(--lime); }

.about-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: clamp(48px, 8vh, 90px);
}
.about-cols .col h3 {
  color: var(--grey);
  margin-bottom: 14px;
  font-weight: 500;
}
.about-cols .col p { color: var(--bone); font-size: 15px; max-width: 34ch; }

.srow {
  position: relative;
  display: grid;
  grid-template-columns: 90px 1fr auto;
  align-items: center;
  gap: 24px;
  padding: clamp(26px, 4vh, 40px) var(--pad);
  border-top: 1px solid var(--line);
  overflow: hidden;
}
.srow:last-of-type { border-bottom: 1px solid var(--line); }
.srow .bg {
  position: absolute;
  inset: 0;
  background: var(--bone);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.5s var(--ease);
}
.srow:hover .bg { transform: scaleY(1); }
.srow > *:not(.bg) { position: relative; z-index: 1; }
.srow .num { color: var(--grey); transition: color 0.4s ease; }
.srow h3 {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(24px, 4.2vw, 54px);
  line-height: 1;
  letter-spacing: -0.015em;
  transition: color 0.4s ease, transform 0.5s var(--ease);
}
.srow p {
  color: var(--grey);
  font-size: 14.5px;
  max-width: 52ch;
  margin-top: 8px;
  transition: color 0.4s ease;
}
.srow .arr {
  font-size: 26px;
  color: var(--grey);
  transition: color 0.4s ease, transform 0.5s var(--ease);
}
.srow:hover .num { color: rgba(13, 13, 11, 0.55); }
.srow:hover h3 { color: var(--black); transform: translateX(12px); }
.srow:hover p { color: rgba(13, 13, 11, 0.7); }
.srow:hover .arr { color: var(--black); transform: translate(6px, -6px); }

.project {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  gap: 24px;
  align-items: baseline;
  padding: clamp(30px, 5vh, 46px) 0;
  border-top: 1px solid var(--line);
}
.project:last-of-type { border-bottom: 1px solid var(--line); }
.project .num { color: var(--grey); }
.project h3 {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(26px, 4.6vw, 60px);
  line-height: 1;
  letter-spacing: -0.015em;
  transition: color 0.3s ease, transform 0.5s var(--ease);
}
.project:hover h3 { color: var(--lime); transform: translateX(12px); }
.project p {
  color: var(--grey);
  font-size: 14.5px;
  max-width: 58ch;
  margin-top: 12px;
}
.project .side { text-align: right; color: var(--grey); display: grid; gap: 6px; }

.stack-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.stack-grid h3 { color: var(--grey); margin-bottom: 18px; font-weight: 500; }
.stack-grid li {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  font-size: clamp(17px, 1.8vw, 24px);
  letter-spacing: 0.01em;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.stack-grid li small {
  font-family: "JetBrains Mono", monospace;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--grey);
  text-transform: uppercase;
  text-align: right;
}

.contact { padding: clamp(90px, 16vh, 190px) var(--pad) 0; }
.contact h2 { font-size: clamp(56px, 13vw, 190px); }
.contact h2 .stroke { color: transparent; -webkit-text-stroke: 1.5px var(--bone); }
.contact .pitch {
  color: var(--grey);
  max-width: 46ch;
  margin: 30px 0 46px;
  font-size: 15.5px;
}
.mail-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: clamp(20px, 3.4vh, 32px) clamp(24px, 3.5vw, 44px);
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 700;
  font-size: clamp(15px, 2.6vw, 34px);
  letter-spacing: 0;
  text-transform: lowercase;
  position: relative;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.mail-btn .bg {
  position: absolute;
  inset: 0;
  background: var(--lime);
  transform: translateY(101%);
  transition: transform 0.5s var(--ease);
}
.mail-btn:hover .bg { transform: translateY(0); }
.mail-btn span, .mail-btn i { position: relative; z-index: 1; transition: color 0.4s ease; }
.mail-btn i { font-style: normal; font-size: 0.85em; }
.mail-btn:hover span, .mail-btn:hover i { color: var(--black); }
.contact .alt { margin-top: 26px; color: var(--grey); }
.contact .alt a {
  color: var(--bone);
  border-bottom: 1px solid var(--line);
  transition: color 0.2s, border-color 0.2s;
}
.contact .alt a:hover { color: var(--lime); border-color: var(--lime); }

.footer {
  margin-top: clamp(80px, 14vh, 160px);
  border-top: 1px solid var(--line);
  padding: 26px var(--pad) 34px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 18px;
  flex-wrap: wrap;
  color: var(--grey);
}
.footer nav { display: flex; gap: 24px; flex-wrap: wrap; }
.footer a { transition: color 0.2s ease; }
.footer a:hover { color: var(--lime); }
.footer .time { color: var(--bone); }

.legal {
  max-width: 780px;
  margin: 0 auto;
  padding: clamp(140px, 20vh, 200px) var(--pad) clamp(70px, 10vh, 120px);
}
.legal .overline { color: var(--lime); }
.legal h1 {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(34px, 6vw, 72px);
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 18px 0 12px;
}
.legal .updated { color: var(--grey); font-size: 13px; margin-bottom: 48px; }
.legal h2 {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 700;
  font-size: 21px;
  margin: 44px 0 12px;
}
.legal p, .legal li { color: #b9b5ab; font-size: 15px; margin-bottom: 12px; }
.legal ul { padding-left: 20px; margin-bottom: 16px; }
.legal ul li { list-style: disc; }
.legal a { color: var(--bone); border-bottom: 1px solid var(--line); }
.legal a:hover { color: var(--lime); border-color: var(--lime); }
.legal strong { color: var(--bone); }

.fade {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s var(--ease-out);
}
.fade.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .grain, .cursor-dot, .cursor-ring { display: none !important; }
  .marquee-track { animation: none; }
  .preloader { display: none; animation: none; }
  .hero h1 .line-inner { transform: none; transition: none; }
  .fade { opacity: 1; transform: none; transition: none; }
  .statement .w { opacity: 1; }
  * { animation-duration: 0.01ms !important; }
}

@media (max-width: 900px) {
  .about-cols, .stack-grid { grid-template-columns: 1fr; }
  .srow { grid-template-columns: 56px 1fr; }
  .srow .arr { display: none; }
  .project { grid-template-columns: 56px 1fr; }
  .project .side { grid-column: 2; text-align: left; display: flex; gap: 18px; }
}
@media (max-width: 680px) {
  .topnav { display: none; }
  .menu-btn { display: block; }
  .hero { padding-top: 90px; }
  .hero h1 { font-size: clamp(44px, 13.5vw, 90px); }
  .mail-btn i { display: none; }
}
