/* Mikki Xu — hand-written replica of the original Webflow site (mikki-website-1.0.2).
   Values mirror css/mikki-website-e73167.webflow.css; only the rules the site uses are kept. */

*, *::before, *::after { box-sizing: border-box; }

/* Colors: light by default; the footer toggle sets <html data-theme="dark"> (remembered in localStorage). */
:root {
  --bg: #fff;
  --fg: #1a1b1f;
  --nav: #222;
  --nav-hover: #32343a;
  --tint: #f6f8ff;
  --line: #eee;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #121316;
  --fg: #e6e6e8;
  --nav: #e6e6e8;
  --nav-hover: #c9c9cd;
  --tint: #181a20;
  --line: #2a2b30;
  color-scheme: dark;
}

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: Montserrat, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 28px;
}

img { display: block; max-width: 100%; height: auto; vertical-align: middle; }

a { color: var(--fg); text-decoration: none; transition: opacity .2s; }

p { margin: 0 0 10px; }

h2 {
  margin: 10px 0 20px;
  font-size: 36px;
  font-weight: 400;
  line-height: 50px;
}

.container { max-width: 1440px; margin: 0 auto; }

/* ---------- Navigation: Mikki  Art  Work ---------- */

.navigation { padding: 140px 30px 60px; }

.navigation-items { display: flex; gap: 4rem; justify-content: flex-start; }

.navigation-item {
  display: block;
  padding: 9px 0;
  color: var(--nav);
  opacity: .6;
  letter-spacing: 1px;
  font-size: 40px;
  font-weight: 500;
  line-height: 20px;
}
.navigation-item:hover { opacity: .9; }
.navigation-item:active { opacity: .8; }
.navigation-item[aria-current="page"] { opacity: 1; color: var(--fg); }
.navigation-item[aria-current="page"]:hover { opacity: .8; color: var(--nav-hover); }

/* Shrinking nav (js/nav.js): the header pins itself with sticky, the links scale down from the left
   as the page scrolls, and a slim bar background (::before) fades in behind them. The three variables are set
   by js/nav.js, and restored before first paint on reload by the inline script in each page's <head>. */
.navigation { position: sticky; top: var(--nav-top, 0px); z-index: 10; pointer-events: none; }
.navigation::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: -1;
  height: 48px;
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  opacity: var(--nav-bg, 0);
}
.navigation-items { transform: scale(var(--nav-scale, 1)); transform-origin: left center; will-change: transform; }
.navigation-item { pointer-events: auto; }

/* in-page links (e.g. /portfolio#smash-pow) stop below the slim bar */
html { scroll-padding-top: 64px; }

/* ---------- Sections ---------- */

.section { padding: 60px 30px 0; }
.section.overflow { background: var(--tint); padding-top: 60px; padding-bottom: 60px; }
.section.overflow.whitebg { background: var(--bg); }

.divider { height: 1px; background: var(--line); }

.image { width: 100%; margin-bottom: 60px; }

/* text column capped at ~700px of text (≈75 characters per line); images stay full width */
.project-headline-wrap { width: 100%; max-width: 760px; margin-bottom: 60px; padding: 0 30px; }

.paragraph-light { opacity: .75; font-size: 17px; line-height: 29px; }

.paragraph-bigger { margin-bottom: 10px; font-size: 20px; line-height: 34px; }

/* ---------- Mikki (home) ---------- */

.about-intro-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 30px 80px;
  align-items: stretch;
  margin-bottom: 140px;
}
/* Desktop: the photo takes the height of the bio text beside it and is cropped to fit (face kept in frame). */
.aboutimage { position: relative; min-height: 420px; }
.aboutimage img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 25%;
}
.intro-wrap { align-self: center; }

/* ---------- Work ---------- */

.filter-items { display: flex; gap: 4rem; align-items: center; padding: 0 5px; }
.filter-items a:hover { opacity: .8; }

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}
.film-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.project-cover { margin-bottom: 40px; }
.project-cover img { width: 100%; }

.work-description {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
  margin-bottom: 60px;
  padding: 0 30px;
}

.project-name-link { display: block; margin-bottom: 5px; font-size: 20px; line-height: 34px; }
a.project-name-link:hover { opacity: .8; }
a.project-name-link:active { opacity: .7; }

/* ---------- Portfolio ---------- */

.video { position: relative; width: 100%; height: 0; padding-top: 56.25%; }
.video.tall { padding-top: 177.7778%; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.reel-wrapper { margin: 40px 0 140px; }

.project-wrapper { display: flex; max-width: 1440px; margin: 40px 0; }
.gif-wrap { flex: 0 0 auto; width: 15%; }
.bomb-wrap { margin-top: -57px; margin-left: 12px; }
.seagull-wrap { margin-top: 2px; margin-right: 23px; }
.seafriend-wrap { margin-top: -36px; margin-right: -16px; }

.slider-list { display: flex; gap: 60px; }
.slider-item { width: 100%; min-width: 0; }
.slider-item > img { width: 100%; }

.container-2 { display: flex; justify-content: center; align-items: center; max-width: 1440px; margin: 0 auto; }
.project-image { margin: 60px 0; }

/* ---------- Footer ---------- */

.footer-wrap { display: flex; justify-content: space-between; padding: 60px 50px 140px; }
.container-footer { display: flex; justify-content: space-between; width: 100%; max-width: 1440px; margin: 0 auto; }
.footer-links { display: flex; gap: 4rem; }
.footer-item { opacity: .6; letter-spacing: 1px; }
.footer-item:hover { opacity: .9; }
.footer-item:active { opacity: .8; }
.copyright { opacity: .5; text-transform: uppercase; font-size: 12px; }

.footer-meta { display: flex; align-items: center; gap: 24px; }
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  opacity: .5;
  font-size: 12px;
  letter-spacing: 1px;
  transition: opacity .3s;
}
.lang-switch:hover { opacity: 1; }

.theme-switch {
  display: inline-flex;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  opacity: .5;
  cursor: pointer;
  transition: opacity .3s;
}
.theme-switch:hover { opacity: 1; }
.theme-switch svg { width: 14px; height: 14px; }
.theme-switch .sun, :root[data-theme="dark"] .theme-switch .moon { display: none; }
:root[data-theme="dark"] .theme-switch .sun { display: block; }
.lang-switch svg { width: 13px; height: 13px; }

/* Chinese pages: Montserrat for Latin, system CJK font for Chinese */
html:lang(zh-CN) body {
  font-family: Montserrat, "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

/* ---------- 404 ---------- */

.notfound { padding-bottom: 60px; }
.notfound p { opacity: .6; }

/* ---------- Tablet (≤991px) ---------- */

@media screen and (max-width: 991px) {
  .navigation { padding: 25px 30px; }
  .navigation-items { gap: 0; justify-content: space-between; }
  .navigation-item { text-align: center; padding: 15px 0; }

  .about-intro-grid { grid-template-columns: 1fr; row-gap: 50px; }
  .aboutimage { min-height: 0; }
  .aboutimage img { position: static; height: auto; }
  .work-grid, .film-grid { display: flex; flex-direction: column; }
  .project-headline-wrap { width: auto; }
  .slider-list { gap: 20px; }
  .footer-wrap { padding-top: 40px; padding-bottom: 40px; }
  .container-footer { gap: 4rem; }
}

/* ---------- Phone landscape (≤767px) ---------- */

@media screen and (max-width: 767px) {
  .navigation { padding: 20px 30px; }
  .paragraph-bigger { font-size: 16px; line-height: 28px; }
  .project-name-link { font-size: 16px; line-height: 28px; }
  .footer-wrap { text-align: center; }
  .footer-links { flex-direction: column; gap: 0; }
  .footer-item { margin: 10px 0; }
  .container-footer { flex-direction: column; align-items: center; }
}

/* ---------- Phone (≤479px) ---------- */

@media screen and (max-width: 479px) {
  h2 { font-size: 23px; line-height: 33px; }
  .navigation { padding: 60px 30px 0; }
  .navigation-item { font-size: 20px; padding: 15px 0; }
  .section { padding-top: 30px; }
  .section.overflow { padding-top: 30px; padding-bottom: 30px; }
  .about-intro-grid { margin-bottom: 30px; }
  .image { margin-bottom: 30px; }
  .project-headline-wrap { margin-bottom: 30px; padding: 0; }
  .work-description { padding: 0; }
  .filter-items { gap: 0; justify-content: space-between; }
  .filter-items a { font-size: 12px; }
  .project-wrapper { flex-direction: column; margin: 20px 0; }
  .gif-wrap { width: 40%; }
  .bomb-wrap { margin-top: -12px; margin-left: 0; }
  .seagull-wrap { margin-top: 0; margin-right: 12px; }
  .seafriend-wrap { margin: -4px 0 -7px; }
  .slider-list { gap: 10px; flex-wrap: wrap; justify-content: space-between; }
  .project-image { margin: 20px 0; }
  .reel-wrapper { margin-bottom: 40px; }
  .footer-item { font-size: 20px; }
}
