/* mikey - portfolio styles. blue is the one accent, both light + dark. */

:root {
  /* light is default */
  --bg: #f6f8fc;
  --bg-2: #eef2fa;
  --card: #ffffff;
  --card-2: #f4f7fd;
  --text: #0e1726;
  --muted: #5a6b86;
  --line: rgba(14, 23, 38, 0.08);
  --line-2: rgba(14, 23, 38, 0.14);
  --blue: #1d6ff2;
  --blue-ink: #1257cc;
  --blue-soft: rgba(29, 111, 242, 0.10);
  --blue-glow: rgba(29, 111, 242, 0.16);
  --shadow: 0 1px 2px rgba(14, 23, 38, 0.04), 0 12px 30px rgba(14, 23, 38, 0.06);
  --shadow-hover: 0 6px 14px rgba(29, 111, 242, 0.10), 0 18px 44px rgba(14, 23, 38, 0.10);
  --radius: 18px;
  --radius-sm: 12px;
  --radius-pill: 999px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --maxw: 1100px;
  --fdisp: "Sora", "Noto Sans SC", system-ui, sans-serif;
  --fbody: "Plus Jakarta Sans", "Noto Sans SC", system-ui, sans-serif;
}

body.dark {
  --bg: #070b16;
  --bg-2: #0a1020;
  --card: #0f1828;
  --card-2: #131f33;
  --text: #eaf0fb;
  --muted: #93a4c2;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.15);
  --blue: #5b92ff;
  --blue-ink: #8fb6ff;
  --blue-soft: rgba(91, 146, 255, 0.12);
  --blue-glow: rgba(91, 146, 255, 0.30);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 14px 34px rgba(0, 0, 0, 0.45);
  --shadow-hover: 0 0 0 1px rgba(91, 146, 255, 0.25), 0 18px 48px rgba(5, 12, 30, 0.6);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--fbody);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
}

body.lang-cn { font-family: "Noto Sans SC", var(--fbody); }

a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--fdisp); letter-spacing: -0.02em; line-height: 1.08; margin: 0; }
img { display: block; max-width: 100%; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 200;
  background: var(--blue);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
}
.skip-link:focus { left: 12px; }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px clamp(16px, 4vw, 40px);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav__brand {
  font-family: var(--fdisp);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
}
.nav__links {
  display: flex;
  gap: 20px;
  margin: 0 auto;
  font-size: 0.92rem;
  font-weight: 500;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav__links::-webkit-scrollbar { display: none; }
.nav__links a { color: var(--muted); white-space: nowrap; transition: color 0.2s var(--ease); }
.nav__links a:hover, .nav__links a.is-active { color: var(--blue); }
.nav__tools { display: flex; align-items: center; gap: 10px; }
.clock {
  font-variant-numeric: tabular-nums;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--blue);
  white-space: nowrap;
}
.tool-btn {
  border: 1px solid var(--line-2);
  background: var(--card);
  color: var(--text);
  border-radius: var(--radius-pill);
  padding: 7px 13px;
  font-family: var(--fbody);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.15s var(--ease);
}
.tool-btn:hover { border-color: var(--blue); color: var(--blue); }
.tool-btn:active { transform: scale(0.96); }
.tool-btn--icon { display: grid; place-items: center; width: 38px; height: 36px; padding: 0; }
.icon-moon { display: none; }
body.dark .icon-sun { display: none; }
body.dark .icon-moon { display: block; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 22px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.18s var(--ease), box-shadow 0.25s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease);
}
.btn--primary { background: var(--blue); color: #fff; box-shadow: 0 8px 22px var(--blue-glow); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px var(--blue-glow); }
.btn--primary:active { transform: translateY(0) scale(0.98); }
.btn--ghost { background: transparent; color: var(--text); border: 1px solid var(--line-2); }
.btn--ghost:hover { border-color: var(--blue); color: var(--blue); transform: translateY(-2px); }

/* ---------- shared section ---------- */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(64px, 9vw, 120px) clamp(16px, 4vw, 40px);
}
.section__head { max-width: 680px; margin-bottom: clamp(34px, 5vw, 56px); }
.section__head h2 { font-size: clamp(1.9rem, 4.4vw, 3.1rem); margin: 10px 0 14px; }
.section__lead { color: var(--muted); font-size: 1.06rem; max-width: 60ch; }
.kicker {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
  margin: 0;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: min(92vh, 760px);
  display: grid;
  align-items: center;
  padding: clamp(40px, 8vh, 90px) clamp(16px, 4vw, 40px) clamp(30px, 6vh, 70px);
  overflow: hidden;
}
.hero__inner { position: relative; max-width: var(--maxw); margin: 0 auto; width: 100%; z-index: 2; }
.hero__glow {
  position: absolute;
  top: -10%;
  left: 50%;
  transform: translateX(-50%);
  width: min(900px, 90vw);
  height: 560px;
  background: radial-gradient(closest-side, var(--blue-glow), transparent 72%);
  filter: blur(20px);
  z-index: 0;
  animation: drift 16s ease-in-out infinite alternate;
}
.hero__map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  fill: var(--blue);
  stroke: var(--blue);
  stroke-width: 1;
  opacity: 0.16;
}
.hero__map path { fill: none; stroke-dasharray: 5 9; }
.hero__title { font-size: clamp(2.6rem, 8vw, 5.4rem); font-weight: 800; max-width: 14ch; }
.hero__sub { font-size: clamp(1.05rem, 2.4vw, 1.45rem); color: var(--muted); margin: 18px 0 26px; max-width: 40ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 0; list-style: none; }
.chip {
  border: 1px solid var(--line-2);
  background: var(--card);
  border-radius: var(--radius-pill);
  padding: 8px 15px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease);
}
.chip:hover { transform: translateY(-2px); border-color: var(--blue); }

/* ---------- stats ---------- */
.stats {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 40px);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 22px;
  box-shadow: var(--shadow);
  transition: transform 0.22s var(--ease), box-shadow 0.25s var(--ease);
}
.stat:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.stat__num { display: block; font-family: var(--fdisp); font-weight: 800; font-size: 2.4rem; color: var(--blue); line-height: 1; }
.stat__num--word { font-size: 1.7rem; }
.stat__label { display: block; margin-top: 8px; color: var(--muted); font-size: 0.92rem; font-weight: 500; }

/* ---------- about ---------- */
.about { display: grid; grid-template-columns: 1.5fr 1fr; gap: 18px; align-items: start; }
.about__card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(26px, 4vw, 40px);
  box-shadow: var(--shadow);
}
.avatar {
  width: 58px; height: 58px;
  border-radius: 16px;
  display: grid; place-items: center;
  background: var(--blue);
  color: #fff;
  font-family: var(--fdisp);
  font-weight: 800;
  font-size: 1.6rem;
  margin-bottom: 18px;
  box-shadow: 0 8px 20px var(--blue-glow);
}
.about__card h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); margin: 8px 0 14px; }
.about__bio { color: var(--muted); font-size: 1.05rem; }
.traits { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 22px 0 0; list-style: none; }
.traits li {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--blue-ink);
  background: var(--blue-soft);
  border-radius: var(--radius-pill);
  padding: 6px 13px;
}
.about__facts { display: grid; gap: 14px; }
.fact {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease);
}
.fact:hover { transform: translateX(4px); border-color: var(--blue); }
.fact__label { display: block; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.fact__value { display: block; margin-top: 5px; font-weight: 600; font-size: 1.02rem; }

/* ---------- timeline ---------- */
.timeline { list-style: none; padding: 0; margin: 0 0 clamp(34px, 5vw, 52px); display: grid; gap: 4px; position: relative; }
.timeline::before {
  content: "";
  position: absolute;
  left: 7px; top: 8px; bottom: 8px;
  width: 2px;
  background: linear-gradient(var(--blue), transparent);
  opacity: 0.4;
}
.timeline__item { position: relative; padding: 12px 0 12px 34px; }
.timeline__dot {
  position: absolute;
  left: 0; top: 16px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--card);
  border: 3px solid var(--blue);
  box-shadow: 0 0 0 4px var(--blue-soft);
}
.timeline__era { font-family: var(--fdisp); font-weight: 700; font-size: 1.1rem; }
.timeline__text { margin: 4px 0 0; color: var(--muted); }

/* ---------- generic 3-card grid ---------- */
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.topic {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px;
  box-shadow: var(--shadow);
  transition: transform 0.22s var(--ease), box-shadow 0.25s var(--ease), border-color 0.2s var(--ease);
}
.topic:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); border-color: var(--blue); }
.topic h3 { font-size: 1.4rem; margin-bottom: 8px; }
.topic p { color: var(--muted); margin: 0; }

/* ---------- travel ---------- */
.travel { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; align-items: start; }
.travel__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.tcard {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: transform 0.22s var(--ease), box-shadow 0.25s var(--ease);
}
.tcard:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }
.tcard__icon, .athlete__icon, .device__icon, .track__art {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--blue-soft);
  color: var(--blue);
  margin-bottom: 14px;
}
.tcard h3 { font-size: 1.2rem; margin-bottom: 6px; }
.tcard p { color: var(--muted); margin: 0; font-size: 0.96rem; }

.travel__map {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.mapviz { width: 100%; height: auto; margin: 12px 0 6px; }
.mapviz__arc { fill: none; stroke: var(--blue); stroke-width: 1.6; stroke-dasharray: 4 6; opacity: 0.7; }
.mapviz__pin circle { fill: var(--blue); }
.mapviz__pin text { fill: var(--muted); font-size: 9px; font-family: var(--fbody); font-weight: 600; text-anchor: middle; }
.placetags { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 14px 0; list-style: none; }
.placetags li { font-size: 0.8rem; font-weight: 600; color: var(--blue-ink); background: var(--blue-soft); border-radius: var(--radius-pill); padding: 5px 12px; }
.travel__next { color: var(--muted); font-size: 0.95rem; margin: 6px 0 0; }

/* ---------- sports ---------- */
.section--court { position: relative; }
.section--court::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(var(--bg-2), var(--bg-2)),
    repeating-linear-gradient(0deg, transparent 0 38px, var(--line) 38px 39px),
    repeating-linear-gradient(90deg, transparent 0 38px, var(--line) 38px 39px);
  background-blend-mode: normal;
  opacity: 0.5;
}
.athletes { gap: 16px; }
.athlete {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: var(--shadow);
  transition: transform 0.22s var(--ease), box-shadow 0.25s var(--ease), border-color 0.2s var(--ease);
}
.athlete:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); border-color: var(--blue); }
.athlete__sport { display: block; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.athlete h3 { font-size: 1.45rem; margin-bottom: 8px; }
.athlete p { color: var(--muted); margin: 0; font-size: 0.96rem; }
.athlete--me { background: linear-gradient(135deg, var(--blue), var(--blue-ink)); color: #fff; border-color: transparent; }
.athlete--me .athlete__sport { color: rgba(255, 255, 255, 0.8); }
.athlete--me p { color: rgba(255, 255, 255, 0.92); }

/* ---------- music ---------- */
.music { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.music__cards { display: grid; gap: 12px; }
.track {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  box-shadow: var(--shadow);
  transition: transform 0.18s var(--ease), border-color 0.2s var(--ease);
}
.track:hover { transform: translateX(4px); border-color: var(--blue); }
.track__art { margin: 0; flex: none; }
.track__meta { display: grid; }
.track__name { font-weight: 700; font-family: var(--fdisp); font-size: 1.02rem; }
.track__by { color: var(--muted); font-size: 0.88rem; }
.spotify-slot {
  display: grid;
  place-content: center;
  text-align: center;
  gap: 6px;
  min-height: 220px;
  background: var(--card-2);
  border: 1.5px dashed var(--line-2);
  border-radius: var(--radius);
  padding: 30px;
}
.spotify-slot p { margin: 0; font-weight: 700; font-family: var(--fdisp); }
.spotify-slot__mark { color: #1db954; display: grid; place-items: center; margin-bottom: 6px; }
.spotify-slot__hint { font-weight: 500 !important; font-family: var(--fbody) !important; color: var(--muted); font-size: 0.9rem; }

/* ---------- setup ---------- */
.setup-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.device {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 20px;
  box-shadow: var(--shadow);
  transition: transform 0.22s var(--ease), box-shadow 0.25s var(--ease);
}
.device:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.device h3 { font-size: 1.12rem; margin-bottom: 4px; }
.device__note { color: var(--muted); font-size: 0.86rem; }
.device--apps { background: var(--blue-soft); border-color: transparent; }

/* ---------- photos ---------- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 200px; gap: 14px; }
.ph {
  position: relative;
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  display: grid;
  align-items: end;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, var(--blue-soft), var(--card-2));
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.ph:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.ph span {
  position: relative;
  z-index: 2;
  padding: 14px 16px;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text);
}
.ph::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120px 80px at 30% 25%, var(--blue-glow), transparent 70%);
  opacity: 0.6;
}
.ph--1 { grid-column: span 2; }
.ph--6 { grid-column: span 2; }

/* ---------- faq ---------- */
.faq {
  max-width: 760px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item:last-child { border-bottom: 0; }
.faq__q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
  font-family: var(--fdisp);
  font-weight: 600;
  font-size: 1.06rem;
  color: var(--text);
  transition: color 0.2s var(--ease);
}
.faq__q:hover { color: var(--blue); }
.faq__plus { position: relative; flex: none; width: 16px; height: 16px; }
.faq__plus::before, .faq__plus::after {
  content: "";
  position: absolute;
  background: var(--blue);
  border-radius: 2px;
  transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
}
.faq__plus::before { top: 7px; left: 0; width: 16px; height: 2px; }
.faq__plus::after { top: 0; left: 7px; width: 2px; height: 16px; }
.faq__q[aria-expanded="true"] .faq__plus::after { transform: rotate(90deg); opacity: 0; }
.faq__a { overflow: hidden; max-height: 0; transition: max-height 0.3s var(--ease); }
.faq__a p { margin: 0; padding: 0 24px 22px; color: var(--muted); }

/* ---------- contact ---------- */
.contact {
  max-width: 760px;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(30px, 5vw, 52px);
  box-shadow: var(--shadow);
  text-align: center;
}
.contact h2 { font-size: clamp(1.9rem, 4.4vw, 2.8rem); margin: 10px 0 12px; }
.contact .section__lead { margin: 0 auto 28px; }
.contact__rows { display: grid; gap: 10px; text-align: left; }
.crow {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px 20px;
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font: inherit;
  color: var(--text);
  cursor: pointer;
  transition: transform 0.18s var(--ease), border-color 0.2s var(--ease);
}
.crow:hover { transform: translateX(4px); border-color: var(--blue); }
.crow__label { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.crow__value { font-weight: 600; }
.crow__arrow { color: var(--blue); font-weight: 700; }

/* ---------- footer ---------- */
.footer {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 26px clamp(16px, 4vw, 40px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 500;
}

/* ---------- toast ---------- */
.toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%) translateY(14px);
  background: var(--blue);
  color: #fff;
  padding: 11px 20px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.88rem;
  box-shadow: 0 10px 30px var(--blue-glow);
  opacity: 0;
  pointer-events: none;
  z-index: 999;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); transition-delay: var(--d, 0ms); }
.reveal.in { opacity: 1; transform: none; }

@keyframes drift {
  from { transform: translateX(-52%) translateY(0); }
  to { transform: translateX(-48%) translateY(24px); }
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .about, .travel, .music { grid-template-columns: 1fr; }
  .cards-3, .athletes { grid-template-columns: repeat(2, 1fr); }
  .setup-grid { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .nav { gap: 10px; }
  .nav__links { font-size: 0.86rem; gap: 14px; }
  .clock { display: none; }
  .travel__grid { grid-template-columns: 1fr; }
  .cards-3, .athletes, .setup-grid, .gallery { grid-template-columns: 1fr; }
  .gallery { grid-auto-rows: 170px; }
  .ph--1, .ph--6 { grid-column: span 1; }
  .crow { grid-template-columns: 90px 1fr auto; gap: 10px; padding: 14px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__glow { animation: none; }
}
