/* Palette: Ink, Paper, Steel, Panel, Select (Roblox Studio selection blue, used only for interaction) */
:root {
  --ink: #000000;
  --paper: #ffffff;
  --steel: #8b9098;
  --panel: #1f2022;
  --select: #00a2ff;

  --bg: var(--ink);
  --fg: var(--paper);
  --muted: var(--steel);
  --line: #2a2c2f;

  --wide: "wdth" 125;
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1280px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: var(--paper);
  --fg: var(--ink);
  --muted: #5d6168;
  --line: #e3e4e6;
  color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: var(--paper);
    --fg: var(--ink);
    --muted: #5d6168;
    --line: #e3e4e6;
    color-scheme: light;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Archivo", system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
::selection { background: var(--select); color: #fff; }
:focus-visible { outline: 2px solid var(--select); outline-offset: 4px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--gutter); top: 12px; z-index: 10; background: var(--fg); color: var(--bg); padding: 8px 12px; }

main, .top, .foot { width: min(var(--max), 100% - 2 * var(--gutter)); margin-inline: auto; }

/* ---------- Top bar ---------- */
.top {
  display: flex; align-items: center; gap: 32px;
  padding-block: 24px;
}
.top__name {
  font-weight: 800; font-variation-settings: var(--wide);
  font-size: 18px; text-decoration: none; margin-right: auto;
}
.top nav { display: flex; gap: 28px; }
.top nav a { text-decoration: none; color: var(--muted); font-size: 16px; }
.top nav a:hover { color: var(--fg); }
.theme {
  width: 28px; height: 28px; padding: 0; border: 0; background: none; cursor: pointer;
  display: grid; place-items: center;
}
.theme__dot {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--fg);
  background: linear-gradient(90deg, var(--fg) 50%, transparent 50%);
}

/* ---------- Hero ---------- */
.hero { padding-top: clamp(40px, 8vw, 112px); }

.wordmark {
  position: relative;
  overflow: hidden;
  font-weight: 900;
  font-variation-settings: var(--wide);
  font-size: clamp(64px, 19.4vw, 262px);
  line-height: .8;
  letter-spacing: -0.03em;
  padding-block: .06em;
  margin-left: -0.04em;
}
.wordmark__text { display: inline-block; white-space: nowrap; }
/* Two cuts at the same angle as the slashes in the T. P. Interactive mark */
.wordmark__cut {
  position: absolute; top: -10%; bottom: -10%;
  width: .07em;
  background: var(--bg);
  transform: skewX(-34deg) scaleY(1);
  transform-origin: 50% 100%;
  animation: cut .7s cubic-bezier(.7, 0, .2, 1) both;
}
.wordmark__cut--a { left: 19.8%; animation-delay: .25s; } /* through the H */
.wordmark__cut--b { left: 69.6%; animation-delay: .4s; }  /* through the I */
@keyframes cut {
  from { transform: skewX(-34deg) scaleY(0); }
  to   { transform: skewX(-34deg) scaleY(1); }
}

.hero__body {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: 48px;
  margin-top: clamp(32px, 5vw, 64px);
  align-items: start;
}
.hero__intro {
  font-size: clamp(24px, 2.6vw, 34px);
  line-height: 1.25;
  letter-spacing: -0.01em;
  max-width: 24ch;
  font-weight: 500;
}
.hero__side { display: grid; gap: 16px; color: var(--muted); max-width: 40ch; }
.status { color: var(--fg); font-weight: 700; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }

/* Buttons take the chamfered corners of the logo's P */
.btn {
  --cut: 10px;
  display: inline-flex; align-items: center;
  font: inherit; font-size: 16px; font-weight: 600;
  padding: 12px 20px;
  border: 0; cursor: pointer; text-decoration: none;
  background: var(--panel); color: var(--paper);
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
}
:root[data-theme="light"] .btn { background: #ececee; color: var(--ink); }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .btn { background: #ececee; color: var(--ink); } }
.btn:hover { background: var(--select); color: #fff; }
.btn.btn--solid { background: var(--fg); color: var(--bg); }
.btn.btn--solid:hover { background: var(--select); color: #fff; }
.btn--small { --cut: 6px; padding: 6px 12px; font-size: 14px; margin-left: 10px; vertical-align: 2px; }

/* ---------- Section headings ---------- */
.heading {
  font-weight: 800;
  font-variation-settings: var(--wide);
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1;
  letter-spacing: -0.02em;
}

/* ---------- Work ---------- */
.work { padding-top: clamp(96px, 14vw, 180px); }
.work .heading { margin-bottom: clamp(32px, 4vw, 56px); }

.project {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 48px;
  padding: 36px 0;
  border-top: 1px solid var(--line);
}
/* Hovering a project selects it like a part in Roblox Studio */
.project::after {
  content: ""; position: absolute; inset: 8px -16px;
  border: 2px solid var(--select);
  opacity: 0; pointer-events: none;
}
.project:hover::after, .project:focus-within::after { opacity: 1; }
.project__title {
  font-weight: 800;
  font-variation-settings: var(--wide);
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.02;
  letter-spacing: -0.02em;
}
.project__head { display: grid; gap: 24px; align-content: start; }
.project__shot { display: block; max-width: 460px; }
.project__shot img {
  display: block; width: 100%; height: auto;
  --cut: 18px;
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
}
.project__body { display: grid; gap: 20px; max-width: 60ch; align-content: start; }
.project__lede { font-size: 20px; line-height: 1.45; }

.facts { margin: 0; display: grid; gap: 8px; }
.facts div { display: grid; grid-template-columns: 96px 1fr; gap: 16px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }

.link {
  font-weight: 600; width: fit-content;
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px;
}
.link:hover { color: var(--select); }

/* ---------- Studio ---------- */
.studio {
  margin-top: clamp(96px, 14vw, 180px);
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 48px;
  align-items: center;
}
.studio__logo { width: 100%; max-width: 420px; height: auto; display: block; }
.studio__text { display: grid; gap: 20px; max-width: 52ch; }
.studio__text p { font-size: 20px; line-height: 1.45; color: var(--muted); }

/* ---------- Craft ---------- */
.craft { padding-top: clamp(96px, 14vw, 180px); }
.craft__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 48px 64px;
  margin-top: clamp(32px, 4vw, 56px);
}
.craft h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.craft p { color: var(--muted); max-width: 46ch; }

/* ---------- Contact ---------- */
.contact { padding-top: clamp(96px, 14vw, 180px); padding-bottom: 64px; display: grid; gap: 20px; }
.contact__lede { color: var(--muted); font-size: 20px; }
.contact__mail {
  font-weight: 800;
  font-variation-settings: var(--wide);
  font-size: clamp(18px, 5.2vw, 68px);
  letter-spacing: -0.02em;
  line-height: 1.05;
  text-decoration: none;
  width: fit-content;
  margin-top: 12px;
}
.contact__mail:hover { color: var(--select); }
.contact__alt { font-size: 18px; }
.elsewhere { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-wrap: wrap; gap: 12px 32px; }
.elsewhere a { color: var(--muted); text-underline-offset: 4px; }
.elsewhere a:hover { color: var(--fg); }

/* ---------- Footer ---------- */
.foot { padding-block: 32px 48px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px;
  transform: translate(-50%, 12px);
  background: var(--select); color: #fff;
  font-size: 15px; font-weight: 600;
  padding: 10px 16px;
  opacity: 0; pointer-events: none;
  transition: opacity .15s, transform .15s;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Small screens ---------- */
@media (max-width: 820px) {
  .hero__body, .project, .studio { grid-template-columns: 1fr; gap: 20px; }
  .studio__logo { max-width: 240px; }
  .craft__grid { grid-template-columns: 1fr; gap: 32px; }
  .project::after { inset: 4px -8px; }
}
@media (max-width: 520px) {
  body { font-size: 17px; }
  .top { gap: 18px; }
  .top nav { gap: 16px; }
  .project__lede, .studio__text p, .contact__lede { font-size: 18px; }
  .facts div { grid-template-columns: 80px 1fr; gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .wordmark__cut { animation: none; }
  .toast { transition: none; }
}
