@font-face {
  font-family: "Zhi Mang Xing";
  src: url("https://cdn.jsdelivr.net/fontsource/fonts/zhi-mang-xing@5.3.0/latin-400-normal.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --background: #0c1014;
  --panel: #151b21;
  --line: #313d45;
  --text: #f5f7f6;
  --muted: #b3c0c6;
  --accent: #77ecde;
  --ink: #071b1c;
  --display-font: "Zhi Mang Xing", "Segoe UI", cursive;
  --edge: clamp(1.25rem, 5vw, 5rem);
  font-family: "Segoe UI", system-ui, sans-serif;
  background: var(--background);
  color: var(--text);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img, video { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.shell { width: min(calc(100% - 2 * var(--edge)), 82rem); margin-inline: auto; }
.skip-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 20;
  transform: translateY(-180%);
  background: var(--accent);
  color: var(--ink);
  padding: .65rem 1rem;
}
.skip-link:focus { transform: none; }

.site-header { border-bottom: 1px solid #d2e3ea25; background: #0c1014; }
.home .site-header {
  z-index: 2;
  position: absolute;
  inset: 0 0 auto;
  background: #0a1118ab;
  backdrop-filter: blur(16px);
}
.header-inner { min-height: 5.15rem; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.brand { display: inline-flex; flex: none; align-items: center; gap: .7rem; }
.brand img { object-fit: contain; }
.brand span { font-family: var(--display-font); font-weight: 400; font-size: 1.5rem; line-height: 1; }
.navigation { display: flex; align-items: center; gap: clamp(.85rem, 3vw, 2.5rem); }
.navigation a { padding-block: .65rem; color: #edf5f4; font-family: var(--display-font); font-size: 1.6rem; line-height: 1; }
.navigation a:hover, .navigation [aria-current="page"] { color: var(--accent); }
.navigation [aria-current="page"] { box-shadow: inset 0 -2px var(--accent); }
.brand span, .navigation a, .hero h1, .category h1, .section-heading h2, .work-card h3, .project h2 {
  letter-spacing: .02em;
}

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: center;
  min-height: 39rem;
  min-height: max(39rem, 89svh);
  overflow: clip;
  background: #111c27 url("assets/web/showreel-1.jpg") center/cover no-repeat;
}
.hero-video, .hero-overlay { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-video { z-index: -2; object-fit: cover; object-position: center; }
.hero-overlay {
  z-index: -1;
  background:
    linear-gradient(90deg, #070d15ed 0%, #08101ac4 29%, #09141c53 57%, #09141c12 82%),
    linear-gradient(0deg, #0a1016d9, #0a101600 35%);
}
.hero-content { padding-block: 8.25rem 6.5rem; }
.eyebrow {
  color: var(--accent);
  font-size: .84rem;
  font-weight: 720;
  text-transform: uppercase;
  letter-spacing: .19em;
  margin-bottom: 1.15rem;
}
.hero h1, .category h1 {
  font-family: var(--display-font);
  font-weight: 400;
  font-size: clamp(4.5rem, 10.5vw, 10rem);
  line-height: .99;
}
.hero h1 span { color: var(--accent); }
.hero-controls { position: absolute; inset: auto 0 1.45rem; display: flex; justify-content: end; pointer-events: none; }
.media-toggle {
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  border: 1px solid #c3d5da65;
  border-radius: 50%;
  background: #09121bc7;
  cursor: pointer;
  pointer-events: auto;
}
.media-toggle:hover { border-color: var(--accent); color: var(--accent); }
.media-toggle svg, .project-arrow svg { width: 1.2rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.demo-reel { padding-top: clamp(2.5rem, 6vw, 5rem); text-align: center; }
.demo-player {
  position: relative;
  background: #080c11;
  border: 1px solid var(--line);
  border-radius: .5rem;
}
.demo-player video { width: 100%; aspect-ratio: 16 / 9; border-radius: inherit; }
.demo-play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: clamp(3.25rem, 7vw, 4.75rem);
  aspect-ratio: 1;
  padding: 0;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  color: var(--ink);
  box-shadow: 0 0 0 .35rem #070d1560;
  cursor: pointer;
}
.demo-play[hidden] { display: none; }
.demo-play:hover { background: #b3fff5; }
.demo-play svg { width: 45%; fill: currentColor; }

.work { padding-block: clamp(2.5rem, 6vw, 5rem) clamp(3rem, 7vw, 6.5rem); }
.section-heading { margin-bottom: 1.4rem; }
.section-heading h2 { font-family: var(--display-font); font-weight: 400; font-size: clamp(2.5rem, 5vw, 4rem); line-height: 1; }
.work-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.work-card { position: relative; display: block; aspect-ratio: 5 / 4; overflow: hidden; border-radius: .4rem; border: 1px solid var(--line); background: var(--panel); }
.work-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, #070d13f5, #0f192329 60%); }
.work-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 280ms ease; }
.work-card:hover img { transform: scale(1.045); }
.work-card:hover { border-color: var(--accent); }
.work-card h3 { position: absolute; z-index: 1; inset: auto 1rem 1rem; font-family: var(--display-font); font-weight: 400; font-size: clamp(1.6rem, 3vw, 2.55rem); line-height: 1; }

.about { padding-top: clamp(2.5rem, 5vw, 4.5rem); }
.about-bio { max-width: 68ch; color: var(--muted); font-size: clamp(1rem, 1.65vw, 1.16rem); line-height: 1.65; }
.about-bio p + p { margin-top: .85em; }
.toolkit { padding-bottom: clamp(3rem, 7vw, 6.5rem); }
.toolkit h2 { margin-bottom: 1.15rem; font: 400 clamp(1.9rem, 3vw, 2.7rem) / 1.1 var(--display-font); letter-spacing: .02em; }
.tool-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: .75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tool-grid li {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  min-height: 6rem;
  padding: .8rem .5rem;
  border: 1px solid var(--line);
  border-radius: .4rem;
  background: var(--panel);
  text-align: center;
  font-size: .9rem;
  line-height: 1.25;
}
.tool-grid img { object-fit: contain; }

.category { max-width: 58rem; padding-block: clamp(2.4rem, 6vw, 5.5rem) clamp(3.4rem, 8vw, 7rem); }
.back-link { display: inline-block; color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: .35rem; margin-bottom: 1.3rem; font-size: .95rem; }
.back-link:hover { color: var(--accent); }
.category h1 { font-size: clamp(2.65rem, 7vw, 6.75rem); margin-bottom: clamp(1.75rem, 4vw, 3.3rem); }
.project-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(2rem, 6vw, 4.5rem); }
.project { min-width: 0; border: 1px solid var(--line); border-radius: .55rem; overflow: hidden; background: var(--panel); }
.project h2 { padding: 1rem 1.05rem 0; font-family: var(--display-font); font-weight: 400; font-size: clamp(1.9rem, 3vw, 2.55rem); line-height: 1.1; }
.viewport { overflow: hidden; aspect-ratio: 16 / 9; background: #080c11; }
.track { display: flex; height: 100%; transition: transform 280ms ease; }
.slide { flex: 0 0 100%; min-width: 0; height: 100%; display: grid; place-items: center; }
.slide img, .slide video { width: 100%; height: 100%; object-fit: contain; }
.slide video { display: block; }
.slide-image { padding: 0; border: 0; background: none; width: 100%; height: 100%; cursor: pointer; touch-action: pan-y; }
.slide-image:focus-visible { outline-offset: -4px; }
.gallery-controls { padding: .9rem 1.05rem 1.05rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .7rem; }
.thumbnails, .step-controls { display: flex; align-items: center; gap: .45rem; }
.thumb {
  width: clamp(2.5rem, 7vw, 3.55rem);
  height: 2.35rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: .25rem;
  overflow: hidden;
  background: #0a1319;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb svg { width: 1rem; fill: currentColor; }
.thumb[aria-current="true"], .thumb:hover, .project-arrow:hover { border-color: var(--accent); color: var(--accent); }
.thumb[aria-current="true"] { box-shadow: inset 0 0 0 1px var(--accent); }
.thumb[aria-current="true"] img { opacity: .72; }
.project-arrow {
  width: 2.35rem;
  height: 2.35rem;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: .3rem;
  background: #0e161c;
  cursor: pointer;
}
.position { min-width: 2.6rem; color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; font-size: .85rem; }

.site-footer { border-top: 1px solid var(--line); background: #090d11; }
.footer-inner { min-height: 5.9rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand-footer span { color: var(--muted); }
.socials { display: flex; gap: .6rem; }
.social {
  width: 2.85rem;
  height: 2.85rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--panel);
  color: var(--text);
}
a.social:hover { color: var(--accent); border-color: var(--accent); }
.social svg { width: 1.3rem; height: 1.3rem; fill: currentColor; }

@media (max-width: 42rem) {
  .header-inner { flex-wrap: wrap; gap: .25rem; padding-block: .55rem .25rem; }
  .brand img { width: 2.55rem; height: 2.55rem; }
  .navigation { width: 100%; gap: .5rem; justify-content: space-between; }
  .navigation a { font-size: clamp(1.05rem, 4.5vw, 1.4rem); }
  .hero { min-height: max(34rem, 86svh); }
  .hero-overlay { background: linear-gradient(90deg, #071019d9, #0710196b 75%), linear-gradient(0deg, #0a1016cb, transparent 38%); }
  .hero h1 { font-size: clamp(3.85rem, 14vw, 6rem); }
  .work-grid { grid-template-columns: minmax(0, 1fr); gap: .75rem; }
  .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
  .footer-inner { min-height: 5rem; gap: .5rem; padding-block: .85rem; }
  .brand-footer { min-width: 0; flex-shrink: 1; }
  .brand-footer span { font-size: clamp(1.15rem, 4.5vw, 1.5rem); }
  .socials { gap: .35rem; }
  .social { width: 2.4rem; height: 2.4rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; }
}
