:root {
  --bg: #f3f1ec;
  --ink: #141413;
  --muted: #8a867e;
  --line: #dcd8cf;
  --red: #e3261b;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Inter Tight", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  --g: clamp(16px, 4vw, 56px);
  --ease: cubic-bezier(.2, .7, .1, 1);
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #121211; --ink: #eeebe4; --muted: #7d7a73; --line: #292825; --red: #ff3b2f; }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 15px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100svh; display: flex; flex-direction: column;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; }
::selection { background: var(--red); color: #fff; }

.dot {
  display: inline-block; width: .3em; height: .3em; border-radius: 50%;
  background: var(--red); margin-left: .05em;
}

/* Top */
.top {
  display: flex; justify-content: space-between; align-items: center;
  padding: 22px var(--g);
}
.mark { font-weight: 500; font-size: 20px; letter-spacing: -.04em; }

main { flex: 1; padding: 0 var(--g); }

/* Hero */
.hero { padding: clamp(80px, 18vh, 200px) 0 clamp(80px, 16vh, 180px); }
h1 {
  font-weight: 500; font-size: clamp(48px, 10.5vw, 176px);
  line-height: .92; letter-spacing: -.05em;
}
h1 em { letter-spacing: -.02em; padding-right: .04em; }
.line { display: block; overflow: hidden; padding-bottom: .2em; margin-bottom: -.14em; }
.line > span { display: inline-block; animation: rise 1.1s var(--ease) both; }
.line:nth-child(2) > span { animation-delay: .12s; }
@keyframes rise { from { transform: translateY(105%); } }
.home { transition: opacity .4s, transform .6s var(--ease); }
.live .home { opacity: 0; transform: scale(0); }

.lede {
  margin-top: 36px; max-width: 30ch; color: var(--muted);
  font-size: clamp(16px, 1.5vw, 19px);
  animation: fade 1s .5s both;
}
@keyframes fade { from { opacity: 0; transform: translateY(8px); } }

/* Projects */
.projects { list-style: none; border-top: 1px solid var(--line); }
.project {
  display: grid; grid-template-columns: 56px 1fr auto 44px;
  align-items: center; gap: 24px;
  padding: 26px 0; border-bottom: 1px solid var(--line);
}
.num { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.name {
  font-size: clamp(32px, 5vw, 72px); letter-spacing: -.045em; line-height: 1;
  transition: transform .5s var(--ease), color .3s;
}
.desc { color: var(--muted); text-align: right; }
.icon { width: 44px; height: 44px; border-radius: 11px; transition: transform .5s var(--ease); }

a.project:hover .name { transform: translateX(14px); font-family: var(--serif); font-style: italic; letter-spacing: -.02em; }
a.project:hover .icon { transform: rotate(-8deg) scale(1.08); }
.soon .name { color: var(--muted); }
.blink { animation: blink 1.1s steps(1) infinite; color: var(--red); }
@keyframes blink { 50% { opacity: 0; } }

/* Footer */
.foot {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap;
  padding: clamp(80px, 14vh, 160px) var(--g) 24px;
  color: var(--muted); font-size: 13px;
}
.mail {
  color: var(--ink); font-family: var(--serif); font-style: italic;
  font-size: clamp(28px, 4vw, 52px); letter-spacing: -.01em;
  transition: color .3s;
}
.mail:hover { color: var(--red); }

/* The dot-cursor */
.cursor {
  position: fixed; top: 0; left: 0; z-index: 50; pointer-events: none;
  width: 0; height: 0; opacity: 0; transition: opacity .3s;
}
.live .cursor { opacity: 1; }
.cursor::before {
  content: ""; position: absolute; left: -7px; top: -7px;
  width: 14px; height: 14px; border-radius: 50%; background: var(--red);
  transition: transform .45s var(--ease);
}
.cursor.link::before { transform: scale(3.2); mix-blend-mode: multiply; opacity: .9; }
.cursor.show::before { transform: scale(0); }
.cursor img {
  position: absolute; left: 48px; top: -150px; width: 170px; border-radius: 20px;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.35);
  transform: scale(.4) rotate(-6deg); opacity: 0; transform-origin: left center;
  transition: transform .5s var(--ease), opacity .3s;
}
.cursor.show img { transform: scale(1) rotate(-3deg); opacity: 1; }
@media (hover: hover) and (pointer: fine) {
  .live, .live a { cursor: none; }
}

/* Mobile */
@media (max-width: 720px) {
  .project { grid-template-columns: 1fr 44px; gap: 4px 16px; padding: 22px 0; }
  .num { display: none; }
  .name { grid-column: 1; }
  .desc { grid-column: 1; grid-row: 2; text-align: left; }
  .icon { grid-column: 2; grid-row: 1 / span 2; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
