:root {
  --bg: #0a0a0a;
  --fg: #f2f2f2;
  --mid: #8a8a8a;
  --dim: #3a3a3a;
  --line: #1e1e1e;
  --sans: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --pad: clamp(16px, 4vw, 56px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); color: var(--fg); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--bg);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
::selection { background: var(--fg); color: var(--bg); }

.idx {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--mid);
}

/* bar */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px var(--pad);
  font-family: var(--mono); font-size: 12px; letter-spacing: .06em;
  mix-blend-mode: difference; color: #fff;
}
.mark span { color: var(--mid); }
.clock { color: var(--mid); font-variant-numeric: tabular-nums; }

/* hero */
.hero {
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: end;
  padding: 96px var(--pad) var(--pad);
  gap: var(--pad);
  position: relative;
}
.hero-text { position: relative; z-index: 2; padding-bottom: 8px; }
h1 {
  font-weight: 300;
  font-size: clamp(64px, 11.5vw, 200px);
  line-height: .86;
  letter-spacing: -.04em;
  margin: 18px 0 40px -0.06em;
}
.roles { list-style: none; display: grid; gap: 14px; max-width: 520px; }
.roles li {
  display: grid; gap: 2px;
  font-size: 15px; color: var(--mid);
  padding-top: 14px; border-top: 1px solid var(--line);
}
.roles li span { color: var(--fg); font-weight: 500; }
.hero-art {
  position: relative;
  height: min(78svh, 760px);
  align-self: center;
}
#dots { width: 100%; height: 100%; display: block; cursor: crosshair; touch-action: pan-y; }

/* work */
.work { padding: 18vh var(--pad) 10vh; }
.work .idx { margin-bottom: 28px; }
.item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, .8fr);
  grid-template-areas:
    "no name what role"
    ".  desc desc go";
  column-gap: 24px;
  align-items: baseline;
  border-top: 1px solid var(--line);
  padding: 28px 0;
  position: relative;
  transition: padding .5s cubic-bezier(.2,.7,.1,1);
}
.item:last-of-type { border-bottom: 1px solid var(--line); }
.item::before {
  content: ""; position: absolute; left: 0; top: -1px; height: 1px; width: 0;
  background: var(--fg); transition: width .7s cubic-bezier(.2,.7,.1,1);
}
.no { grid-area: no; font-family: var(--mono); font-size: 12px; color: var(--mid); }
.name {
  grid-area: name;
  font-size: clamp(36px, 5.6vw, 88px);
  font-weight: 400;
  letter-spacing: .012em;
  line-height: 1;
  transition: transform .5s cubic-bezier(.2,.7,.1,1);
}
.what { grid-area: what; color: var(--mid); font-size: 15px; }
.role { grid-area: role; font-family: var(--mono); font-size: 12px; color: var(--mid); text-align: right; text-transform: uppercase; letter-spacing: .05em; }
.desc, .go {
  max-height: 0; opacity: 0; overflow: hidden;
  transition: max-height .6s cubic-bezier(.2,.7,.1,1), opacity .4s, margin .6s;
}
.desc { grid-area: desc; max-width: 640px; font-size: 18px; line-height: 1.5; color: #c8c8c8; }
.go { grid-area: go; text-align: right; font-family: var(--mono); font-size: 12px; align-self: end; }

@media (hover: hover) {
  .work:hover .item { color: var(--dim); }
  .work:hover .item .what, .work:hover .item .role, .work:hover .item .no { color: var(--dim); }
  .work .item:hover { color: var(--fg); }
  .work .item:hover .what, .work .item:hover .role, .work .item:hover .no { color: var(--mid); }
  .item:hover::before { width: 100%; }
  .item:hover .name { transform: translateX(14px); }
  .item:hover .desc, .item:hover .go { max-height: 200px; opacity: 1; margin-top: 22px; }
}
.item:focus-visible { outline: 1px solid var(--fg); outline-offset: 6px; }
.item:focus-visible .desc, .item:focus-visible .go { max-height: 200px; opacity: 1; margin-top: 22px; }
.item .name, .item .what, .item .role, .item .no { transition: color .35s, transform .5s cubic-bezier(.2,.7,.1,1); }

/* contact */
.contact {
  padding: 10vh var(--pad) 12vh; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--pad); align-items: center;
}
.c-qr { width: min(420px, 34vw); margin: 0; }
#qr { width: 100%; aspect-ratio: 1; display: block; cursor: pointer; -webkit-tap-highlight-color: transparent; }
#qrcap {
  height: 16px; margin-top: 10px; text-align: center;
  font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--mid);
  opacity: 0; transition: opacity .4s;
}
#qrcap.on { opacity: 1; }
.mail {
  display: inline-block;
  margin: 28px 0 36px;
  font-size: clamp(28px, 5.2vw, 88px);
  font-weight: 300;
  letter-spacing: -.03em;
  line-height: 1;
  background: linear-gradient(var(--fg), var(--fg)) left bottom / 0 1px no-repeat;
  transition: background-size .7s cubic-bezier(.2,.7,.1,1);
  word-break: break-word;
}
.mail:hover { background-size: 100% 1px; }
.links { display: flex; gap: clamp(10px, 1.6vw, 26px); align-items: center; margin-top: clamp(32px, 4vw, 56px); }
.links svg { width: 40%; height: 40%; }
.links a {
  width: clamp(56px, 7.6vw, 124px); height: clamp(56px, 7.6vw, 124px); display: grid; place-items: center;
  border: 1px solid var(--dim); border-radius: 50%; color: var(--mid);
  transition: color .3s, border-color .3s, background-color .3s;
}
.links a:hover, .links a:focus-visible { color: var(--bg); background: var(--fg); border-color: var(--fg); outline: none; }

.foot {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 24px var(--pad);
  border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: 11px; color: var(--mid); letter-spacing: .06em; text-transform: uppercase;
}

/* reveal */
.rv { opacity: 0; transform: translateY(24px); transition: opacity 1s, transform 1s cubic-bezier(.2,.7,.1,1); }
.rv.in { opacity: 1; transform: none; }

@media (max-width: 860px) {
  .contact { grid-template-columns: 1fr; }
  .c-qr { width: min(360px, 100%); justify-self: center; margin-top: 24px; }
  .hero { grid-template-columns: 1fr; align-items: start; padding-top: 72px; }
  .hero-art { order: -1; height: 52svh; }
  h1 { margin-bottom: 28px; }
  .item {
    grid-template-columns: 40px minmax(0, 1fr);
    grid-template-areas: "no name" ". what" ". role" ". desc" ". go";
    row-gap: 6px;
  }
  .role, .go { text-align: left; }
  .desc, .go { max-height: none; opacity: 1; margin-top: 10px; }
  .desc { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
  .rv { opacity: 1; transform: none; }
}
