/* miqui mgfx — motion graphics portfolio
   Type: "vcsm" via Adobe Fonts (Typekit). The kit must list this site's
   domain in Adobe Fonts settings or the browser silently uses the fallback. */

:root {
  --bg: #fff;
  --fg: #000;
  --muted: #555;
  --rule: #e0e0e0;
  --placeholder: #f0f0f0;
  --maxw: 1180px;
}

* { box-sizing: border-box; }

html {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: vcsm, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.65;
}

a { color: inherit; text-decoration: none; }
img, video { max-width: 100%; display: block; }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- header / nav ---------- */

.site-header {
  padding: 46px 0 40px;
}

.brand {
  font-size: 22px;
  letter-spacing: 0.02em;
  margin: 0 0 26px;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  font-size: 14px;
}

.nav a {
  color: var(--muted);
  transition: color 0.18s ease;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--fg);
}

/* ---------- work grid ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
  padding-bottom: 60px;
}

.tile {
  position: relative;
  display: block;
  background: var(--placeholder);
  overflow: hidden;
  aspect-ratio: 460 / 360;
}

.tile video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.25s ease, transform 0.5s ease;
}

.tile:hover video { transform: scale(1.03); }

.tile-label {
  position: absolute;
  inset: auto 0 0 0;
  padding: 14px 16px;
  font-size: 13px;
  letter-spacing: 0.03em;
  color: #fff;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85), transparent);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.tile:hover .tile-label,
.tile:focus-visible .tile-label { opacity: 1; }

/* Touch devices get no hover, so the label must always show. */
@media (hover: none) {
  .tile-label { opacity: 1; }
}

/* ---------- project page ---------- */

.project-title {
  font-size: 22px;
  margin: 0 0 22px;
}

.embed {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: var(--placeholder);
  margin-bottom: 30px;
}

.embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.project-nav {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--rule);
  padding: 22px 0 60px;
  font-size: 13px;
  color: var(--muted);
}

.project-nav a:hover { color: var(--fg); }

/* ---------- prose ---------- */

.prose {
  max-width: 640px;
  padding-bottom: 60px;
}

.prose h1 { font-size: 22px; margin: 0 0 20px; }
.prose h2 { font-size: 15px; margin: 34px 0 10px; color: var(--muted); }
.prose p { margin: 0 0 18px; }
.prose a { border-bottom: 1px solid var(--muted); }
.prose a:hover { border-color: var(--fg); }

.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 14px 0; border-bottom: 1px solid var(--rule); }

/* ---------- about (home) ---------- */

.about {
  display: grid;
  grid-template-columns: minmax(260px, 380px) 1fr;
  gap: 44px;
  align-items: start;
  padding-bottom: 60px;
}

.about .prose { padding-bottom: 0; }

.about-photo {
  margin: 0;
  background: var(--placeholder);
}

.about-photo img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* ---------- creative direction ---------- */

.cd-intro { padding-bottom: 34px; }

.cd-project {
  padding: 0 0 46px;
}

.cd-project h2 {
  font-size: 15px;
  margin: 0 0 8px;
}

.cd-blurb {
  max-width: 640px;
  color: var(--muted);
  margin: 0 0 20px;
}

/* photo slider (one image at a time; swipe / trackpad / buttons) */
.slider {
  position: relative;
  margin-bottom: 44px;
}

.slides {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  height: min(70vh, 620px);
  background: transparent;
  scrollbar-width: none;
}

.slides::-webkit-scrollbar { display: none; }

.slides img {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  /* scale-down = never enlarge past native size, so low-res art (the labels)
     stays crisp and smaller instead of pixelating; big photos still fill. */
  object-fit: scale-down;
  scroll-snap-align: center;
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.25);
  transition: background 0.15s ease;
}

.slider-btn:hover { background: #000; }
.slider-btn.prev { left: 14px; }
.slider-btn.next { right: 14px; }

/* big side-by-side project panels on the landing page */
.cd-index {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding-bottom: 80px;
}

.cd-card {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 46vh;
  padding: 40px 28px;
  border: 1px solid var(--rule);
  color: var(--fg);
  font-size: clamp(30px, 4.4vw, 58px);
  line-height: 1.08;
  transition: background 0.2s ease, color 0.2s ease;
}

.cd-card span { display: block; max-width: 12ch; }
.cd-card:hover { background: var(--fg); color: var(--bg); }

@media (max-width: 640px) {
  .cd-index { grid-template-columns: 1fr; }
  .cd-card { min-height: 32vh; }
}

.cd-back {
  padding: 32px 0 60px;
  font-size: 13px;
  color: var(--muted);
}

.cd-back a:hover { color: var(--fg); }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--rule);
  padding: 26px 0 50px;
  font-size: 12px;
  color: var(--muted);
}

@media (max-width: 640px) {
  .site-header { padding: 30px 0 26px; }
  .grid { grid-template-columns: 1fr; }
  .about { grid-template-columns: 1fr; gap: 26px; }
  .about-photo { max-width: 380px; }
}

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