/* Layout concept: a designer's canvas at night — Figma-style frames, selection handles
   and a live cursor sit on an ink ground; lime marks action, violet marks selection. */
:root {
  --ink: #08090b;
  --panel: #101216;
  --panel-2: #16181d;
  --fg: #f4f5f7;
  --muted: #9a9faa;
  --dim: #6d727d;
  --line: rgba(255, 255, 255, .10);
  --line-2: rgba(255, 255, 255, .18);
  --lime: #b8ff5a;
  --on-lime: #0a0b0c;
  --lime-ink: #44522c;
  --violet: #8b7cff;
  --danger: #ff6b6b;

  --display: "Bricolage Grotesque", "Arial Narrow", system-ui, sans-serif;
  --body: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --max: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; background: var(--ink); }
body {
  font-family: var(--body);
  background: var(--ink);
  color: var(--fg);
  line-height: 1.55;
  font-size: 16px;
  overflow-x: hidden;
  padding-inline: var(--gutter);
}
/* faint canvas dot-grid, like Figma's zoomed-in canvas */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image: radial-gradient(rgba(255,255,255,.07) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 70%);
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; border-radius: 6px; }
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; position: relative; z-index: 1; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30;
  margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter);
  background: color-mix(in srgb, var(--ink) 78%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .3s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav .wrap { height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.logo { font-family: var(--display); font-weight: 800; font-size: 24px; letter-spacing: -.04em; }
.logo span { color: var(--lime); }
.navlinks { display: flex; gap: 30px; font-size: 14px; color: var(--muted); }
.navlinks a { transition: color .2s; }
.navlinks a:hover { color: var(--fg); }
.pill-btn {
  border: 1px solid var(--line-2); padding: 9px 16px; border-radius: 999px;
  font-size: 13px; font-weight: 600; background: rgba(255,255,255,.04); transition: background .2s, border-color .2s;
}
.pill-btn:hover { background: rgba(255,255,255,.09); border-color: var(--lime); }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: 1.25fr .75fr; gap: clamp(36px, 6vw, 80px); align-items: center; padding-block: clamp(40px, 7vw, 90px) 60px; }
.hero-copy { min-width: 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; padding: 7px 13px 7px 10px;
  border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.035);
  color: #c4c7cf; font-size: 13px; margin-bottom: 28px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px rgba(184,255,90,.15); }
.dot.off { background: var(--dim); box-shadow: none; }
h1 {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(42px, 5.3vw, 78px); line-height: 1; letter-spacing: -.045em;
  text-wrap: balance;
}
/* the Figma selection box around the key phrase */
.sel {
  position: relative; display: table; color: var(--lime);
  outline: 1.5px solid var(--violet); outline-offset: 5px;
  margin-block: 14px 40px;
}
.sel .cursor { left: calc(100% + 6px); top: calc(100% + 2px); }
.sel i { position: absolute; width: 9px; height: 9px; background: var(--ink); border: 1.5px solid var(--violet); }
.sel i:nth-of-type(1) { left: -9px; top: -9px; }
.sel i:nth-of-type(2) { right: -9px; top: -9px; }
.sel i:nth-of-type(3) { left: -9px; bottom: -9px; }
.sel i:nth-of-type(4) { right: -9px; bottom: -9px; }
.sel .dims {
  position: absolute; left: 50%; bottom: -38px; transform: translateX(-50%);
  font: 600 11px/1 var(--mono); letter-spacing: .02em; color: #fff; background: var(--violet);
  padding: 5px 7px; border-radius: 4px; white-space: nowrap;
}
.cursor { position: absolute; z-index: 3; pointer-events: none; display: flex; align-items: flex-start; gap: 0; animation: drift 7s ease-in-out infinite; }
.cursor svg { width: 20px; height: 20px; }
.cursor b { font: 600 12px/1 var(--body); background: var(--lime); color: var(--on-lime); padding: 5px 8px; border-radius: 4px 10px 10px 10px; margin-top: 16px; margin-left: -2px; }
@keyframes drift { 0%,100% { transform: translate(0,0); } 35% { transform: translate(-26px, 14px); } 70% { transform: translate(12px, -10px); } }

.hero-copy p.lead { font-size: clamp(17px, 1.5vw, 19px); color: var(--muted); max-width: 58ch; margin: 30px 0 32px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 14px 22px; border-radius: 12px;
  font-weight: 650; font-size: 14px; border: 0; cursor: pointer; transition: transform .2s, box-shadow .2s, background .2s;
}
.btn.primary { background: var(--lime); color: var(--on-lime); }
.btn.primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(184,255,90,.18); }
.btn.ghost { background: rgba(255,255,255,.04); border: 1px solid var(--line-2); }
.btn.ghost:hover { background: rgba(255,255,255,.08); }
.btn.dark { background: var(--on-lime); color: var(--fg); }
.btn.dark:hover { transform: translateY(-2px); }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }

.hero-photo { position: relative; justify-self: center; width: min(460px, 100%); }
.frame-label { font: 500 12px/1 var(--mono); color: var(--dim); margin-bottom: 10px; display: flex; justify-content: space-between; gap: 10px; }
.frame-label span:last-child { color: var(--violet); }
.photo {
  aspect-ratio: 4 / 5; max-width: 100%; border-radius: 28px; overflow: hidden; position: relative;
  border: 1px solid var(--line-2); background: var(--panel-2); box-shadow: 0 40px 90px rgba(0,0,0,.45);
}
.photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 15%; }
.photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(5,6,8,.75), transparent 40%); }
.photo-tag {
  position: absolute; left: 18px; right: 18px; bottom: 18px; z-index: 2; display: flex; justify-content: space-between; align-items: end; gap: 10px;
}
.photo-tag div { background: rgba(10,11,13,.7); border: 1px solid var(--line-2); backdrop-filter: blur(16px); padding: 12px 15px; border-radius: 14px; font-weight: 650; font-size: 14px; }
.photo-tag small { display: block; color: var(--muted); font-weight: 500; font-size: 12px; margin-top: 2px; }
.chip-float {
  position: absolute; z-index: 3; background: var(--panel); border: 1px solid var(--line-2); border-radius: 14px;
  padding: 10px 14px; font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 9px; box-shadow: 0 20px 40px rgba(0,0,0,.35);
}
.chip-float.a { top: 56px; left: -34px; }
.chip-float.b { top: 44%; right: -30px; }
.chip-float .swatch { width: 22px; height: 22px; border-radius: 6px; background: conic-gradient(var(--lime) 0 25%, var(--violet) 0 50%, #ff9f6b 0 75%, #5ad1ff 0); }

/* ---------- stats & marquee ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; background: var(--line); gap: 1px; }
.stat { background: var(--panel); padding: 22px 24px; }
.stat strong { display: block; font-family: var(--display); font-size: 36px; font-weight: 800; letter-spacing: -.04em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat span { font-size: 13px; color: var(--muted); }

.marquee {
  margin: 70px calc(var(--gutter) * -1) 0; border-block: 1px solid var(--line); overflow: hidden;
  padding-block: 18px; position: relative; z-index: 1;
}
.marquee-track { display: flex; gap: 28px; width: max-content; animation: slide 38s linear infinite; font: 500 13px/1 var(--mono); color: #8d929c; text-transform: uppercase; letter-spacing: .08em; }
.marquee-track b { color: var(--lime); font-weight: 400; }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
section { padding-block: clamp(72px, 10vw, 120px); }
.kicker { font: 600 12px/1 var(--mono); color: var(--lime); text-transform: uppercase; letter-spacing: .14em; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }
.kicker::before { content: ""; width: 18px; height: 1px; background: currentColor; }
h2 { font-family: var(--display); font-weight: 800; font-size: clamp(36px, 5vw, 64px); line-height: 1; letter-spacing: -.04em; text-wrap: balance; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px 40px; flex-wrap: wrap; }
.section-head p { color: var(--muted); max-width: 46ch; }

/* ---------- work ---------- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 36px; }
.filter {
  border: 1px solid var(--line); background: transparent; padding: 8px 14px; border-radius: 999px; font-size: 13px;
  color: var(--muted); cursor: pointer; transition: all .2s; display: inline-flex; gap: 7px; align-items: center;
}
.filter sup { font: 500 11px/1 var(--mono); color: var(--dim); vertical-align: baseline; }
.filter:hover { color: var(--fg); border-color: var(--line-2); }
.filter.on { background: var(--fg); color: var(--ink); border-color: var(--fg); }
.filter.on sup { color: #555; }

.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 22px; margin-top: 34px; }
.card { min-width: 0; cursor: pointer; display: flex; flex-direction: column; text-align: left; background: none; border: 0; padding: 0; }
.card .frame-label { margin-bottom: 8px; }
.card .frame-label span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thumb {
  aspect-ratio: 4 / 3; max-width: 100%; border-radius: 18px; overflow: hidden; position: relative;
  background: var(--panel-2); border: 1px solid var(--line); transition: border-color .25s, transform .35s;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.card:hover .thumb, .card:focus-visible .thumb { border-color: var(--violet); }
.card:hover .thumb img { transform: scale(1.04); }
.card:hover .frame-label span:first-child { color: var(--violet); }
.thumb .open { position: absolute; right: 14px; top: 14px; width: 40px; height: 40px; border-radius: 50%; background: var(--lime); color: var(--on-lime); display: grid; place-items: center; font-size: 18px; opacity: 0; transform: scale(.8); transition: all .25s; }
.card:hover .open { opacity: 1; transform: scale(1); }
.star { position: absolute; left: 14px; top: 14px; font: 600 11px/1 var(--mono); background: rgba(10,11,13,.75); border: 1px solid var(--line-2); padding: 6px 9px; border-radius: 999px; backdrop-filter: blur(8px); }
.card h3 { font-family: var(--display); font-size: 22px; font-weight: 700; letter-spacing: -.02em; margin-top: 16px; line-height: 1.2; }
.card p { color: var(--muted); font-size: 14px; margin-top: 6px; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.tag { font-size: 12px; padding: 5px 10px; border-radius: 999px; background: rgba(255,255,255,.05); color: #b3b7c0; border: 1px solid rgba(255,255,255,.07); }
.fallback { position: absolute; inset: 0; display: grid; place-items: center; background: radial-gradient(circle at 75% 20%, rgba(139,124,255,.35), transparent 50%), radial-gradient(circle at 20% 90%, rgba(184,255,90,.18), transparent 45%), var(--panel-2); }
.fallback span { font-family: var(--display); font-weight: 800; font-size: clamp(28px, 4vw, 44px); letter-spacing: -.04em; color: rgba(255,255,255,.85); padding: 0 24px; text-align: center; line-height: 1.05; }
.empty { grid-column: 1 / -1; padding: 60px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line-2); border-radius: 18px; }
.more-links { margin-top: 48px; display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- about / experience ---------- */
.about { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(32px, 7vw, 90px); }
.about-text { font-size: clamp(18px, 1.7vw, 21px); line-height: 1.65; color: #b9bcc5; display: grid; gap: 22px; max-width: 62ch; }
.about-text strong { color: var(--fg); font-weight: 600; }
.timeline { margin-top: 64px; border-top: 1px solid var(--line); }
.row { display: grid; grid-template-columns: 190px 1fr auto; gap: 8px 28px; padding: 22px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.row .when { font: 500 13px/1.4 var(--mono); color: var(--dim); font-variant-numeric: tabular-nums; }
.row .what { min-width: 0; }
.row .what b { font-family: var(--display); font-size: 21px; font-weight: 700; letter-spacing: -.02em; }
.row .what span { color: var(--muted); }
.row .what small { display: block; color: var(--dim); font-size: 14px; margin-top: 4px; }
.row .type { font-size: 12px; color: var(--muted); border: 1px solid var(--line); padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.row.now .when { color: var(--lime); }

/* ---------- services ---------- */
.services { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 44px; }
.service { background: var(--panel); border: 1px solid var(--line); padding: 26px; border-radius: 20px; display: flex; flex-direction: column; gap: 10px; transition: border-color .25s; }
.service:hover { border-color: var(--line-2); }
.service .ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: rgba(184,255,90,.1); color: var(--lime); margin-bottom: 18px; }
.service h3 { font-family: var(--display); font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.service p { font-size: 14px; color: var(--muted); }
.tools { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 26px; }
.tools .tag { font-size: 13px; padding: 7px 12px; }

.cred {
  background: linear-gradient(135deg, var(--panel-2), var(--panel)); border: 1px solid var(--line); border-radius: 28px;
  padding: clamp(28px, 6vw, 64px); display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 6vw, 64px); align-items: center; position: relative; overflow: hidden;
}
.cred::after { content: "i2slabs"; position: absolute; right: -8px; bottom: -0.32em; font: 800 clamp(90px, 15vw, 170px)/1 var(--display); color: rgba(255,255,255,.03); letter-spacing: -.06em; pointer-events: none; }
.cred .kicker { color: var(--violet); }
.cred p { color: #a8adb7; font-size: 17px; position: relative; z-index: 1; }
.cred p + p { margin-top: 14px; }
.cred p strong { color: var(--lime); font-weight: 600; }

/* ---------- contact ---------- */
.cta { background: var(--lime); color: var(--on-lime); border-radius: 30px; padding: clamp(28px, 5vw, 60px); display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(28px, 5vw, 60px); position: relative; overflow: hidden; }
.cta .kicker { color: var(--lime-ink); }
.cta > div:first-child p { color: var(--lime-ink); font-size: 18px; margin-top: 18px; max-width: 42ch; }
.contact-lines { margin-top: 32px; display: grid; gap: 10px; }
.contact-line { display: flex; align-items: center; gap: 10px; font-weight: 600; flex-wrap: wrap; }
.contact-line .copy { border: 1px solid rgba(10,11,13,.25); background: transparent; border-radius: 8px; padding: 4px 9px; font-size: 12px; cursor: pointer; color: var(--on-lime); }
.contact-line .copy:hover { background: rgba(10,11,13,.08); }
.socials { display: flex; gap: 8px; margin-top: 22px; flex-wrap: wrap; }
.socials a { border: 1px solid rgba(10,11,13,.25); padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; transition: background .2s; }
.socials a:hover { background: var(--on-lime); color: var(--lime); }
.form { background: var(--ink); color: var(--fg); border-radius: 22px; padding: clamp(20px, 3vw, 30px); display: grid; gap: 14px; min-width: 0; }
.form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field label { font: 500 12px/1 var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.field input, .field textarea, .field select {
  width: 100%; background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 15px; transition: border-color .2s;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--violet); }
.hp { position: absolute; left: -9999px; }
.form-note { font-size: 14px; min-height: 1.4em; }
.form-note.ok { color: var(--lime); }
.form-note.err { color: var(--danger); }

footer { border-top: 1px solid var(--line); padding-block: 28px 36px; display: flex; justify-content: space-between; gap: 12px; color: var(--dim); font-size: 13px; flex-wrap: wrap; position: relative; z-index: 1; max-width: var(--max); margin-inline: auto; }
footer a:hover { color: var(--fg); }

/* ---------- project modal ---------- */
dialog.modal {
  border: 1px solid var(--line-2); background: var(--panel); color: var(--fg); border-radius: 24px;
  width: min(1040px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); padding: 0; margin: auto; overflow: hidden;
}
dialog.modal::backdrop { background: rgba(4,5,6,.78); backdrop-filter: blur(6px); }
.modal-inner { max-height: calc(100dvh - 40px); overflow-y: auto; }
.modal-top { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; background: color-mix(in srgb, var(--panel) 90%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.modal-top .frame-label { margin: 0; }
.x { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-2); background: transparent; cursor: pointer; font-size: 18px; flex: none; }
.x:hover { background: rgba(255,255,255,.08); }
.modal-body { padding: clamp(18px, 3vw, 32px); display: grid; gap: 24px; }
.modal-hero { border-radius: 16px; overflow: hidden; border: 1px solid var(--line); position: relative; background: var(--panel-2); min-height: 220px; }
.modal-hero img { width: 100%; height: auto; }
.modal-meta { display: grid; grid-template-columns: 1.4fr .6fr; gap: 28px; }
.modal-meta h3 { font-family: var(--display); font-size: clamp(28px, 4vw, 42px); font-weight: 800; letter-spacing: -.035em; line-height: 1.05; }
.modal-meta p { color: #b9bcc5; margin-top: 14px; max-width: 62ch; }
.facts { display: grid; gap: 14px; align-content: start; }
.facts div { border-top: 1px solid var(--line); padding-top: 10px; }
.facts dt { font: 500 11px/1 var(--mono); color: var(--dim); text-transform: uppercase; letter-spacing: .1em; }
.facts dd { margin-top: 6px; }
.gallery { display: grid; gap: 16px; }
.gallery img { border-radius: 14px; border: 1px solid var(--line); width: 100%; }

/* ---------- motion ---------- */
.reveal { opacity: 1; transform: none; }
.js .reveal.pre { transform: translateY(22px); }
.js .reveal { transition: transform .8s cubic-bezier(.2,.7,.2,1); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal.pre { transform: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 1020px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 880px) {
  .navlinks { display: none; }
  .hero, .about, .cred, .cta, .modal-meta { grid-template-columns: 1fr; }
  .hero-photo { order: -1; width: min(380px, 100%); }
  .chip-float.a { left: -10px; } .chip-float.b { right: -10px; }
  .cursor { display: none; }
  .row { grid-template-columns: 1fr auto; }
  .row .when { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .grid, .services, .form .two { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat { padding: 18px; } .stat strong { font-size: 28px; }
  .sel .dims { display: none; }
  .sel { margin-block: 8px 12px; outline-offset: 3px; }
  .row { grid-template-columns: 1fr; } .row .type { justify-self: start; }
  footer { flex-direction: column; }
}
