/* 杨乐 · UI Designer Portfolio
   Light, glassmorphism, soft blue accents */

:root {
  --blue: #4c7cf0;
  --blue-deep: #3a63d4;
  --blue-soft: #6b9aff;
  --blue-wash: #e8f0ff;
  --lavender: #f0f2ff;
  --ink: #1a1f36;
  --ink-soft: #4a5168;
  --muted: #8b92a8;
  --line: rgba(76, 124, 240, 0.14);
  --glass: rgba(255, 255, 255, 0.55);
  --glass-strong: rgba(255, 255, 255, 0.72);
  --shadow: 0 18px 50px rgba(58, 99, 212, 0.12);
  --shadow-sm: 0 8px 24px rgba(58, 99, 212, 0.1);
  --radius: 20px;
  --radius-sm: 12px;
  --nav-h: 72px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "PingFang SC", "Noto Sans SC", "Microsoft YaHei",
    "Helvetica Neue", system-ui, -apple-system, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 12px);
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: linear-gradient(180deg, #f7f9ff 0%, #eef2ff 40%, #f8f9fc 100%);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--blue);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

a:hover {
  color: var(--blue-deep);
}

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  background: var(--blue);
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  z-index: 1000;
}

.skip-link:focus {
  top: 12px;
}

.container {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

/* Header / Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  background: rgba(247, 249, 255, 0.78);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 8px 30px rgba(58, 99, 212, 0.06);
}

.nav {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  font-weight: 600;
}

.nav__brand:hover {
  color: inherit;
}

.nav__mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--blue), var(--blue-soft));
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 12px;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 18px rgba(76, 124, 240, 0.35);
}

.nav__name {
  font-size: 1.05rem;
}

.nav__role {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 500;
  padding-left: 10px;
  border-left: 1px solid var(--line);
  margin-left: 2px;
}

.nav__menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 8px;
}

.nav__menu a {
  display: block;
  padding: 8px 14px;
  color: var(--ink-soft);
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 500;
}

.nav__menu a:hover,
.nav__menu a.is-active {
  color: var(--blue);
  background: var(--blue-wash);
}

.nav__toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  padding: 10px;
  cursor: pointer;
  border-radius: 10px;
}

.nav__toggle span {
  display: block;
  height: 2px;
  margin: 6px 0;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.25s var(--ease), opacity 0.2s;
}

.nav__toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.nav__toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav__toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Hero */
.hero {
  position: relative;
  min-height: calc(100vh - var(--nav-h));
  min-height: calc(100svh - var(--nav-h));
  display: grid;
  place-items: center;
  padding: 64px 20px 80px;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, #6ea0ff 0%, #4c7cf0 42%, #7a8cff 78%, #a8b8ff 100%);
  z-index: 0;
}

.hero__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.55;
}

.hero__blob--1 {
  width: 48vw;
  height: 48vw;
  max-width: 520px;
  max-height: 520px;
  background: #9ec0ff;
  top: -10%;
  left: -8%;
}

.hero__blob--2 {
  width: 40vw;
  height: 40vw;
  max-width: 420px;
  max-height: 420px;
  background: #c4b5ff;
  bottom: -12%;
  right: 8%;
  opacity: 0.4;
}

.hero__blob--3 {
  width: 28vw;
  height: 28vw;
  max-width: 280px;
  max-height: 280px;
  background: #ffd9a8;
  top: 35%;
  left: 8%;
  opacity: 0.35;
}

.hero__rocket {
  position: absolute;
  right: max(4%, 24px);
  bottom: 6%;
  opacity: 0.92;
  filter: drop-shadow(0 16px 24px rgba(20, 40, 100, 0.28));
  animation: floaty 5s ease-in-out infinite;
  z-index: 1;
}

@keyframes floaty {
  0%,
  100% {
    transform: translateY(0) rotate(-8deg);
  }
  50% {
    transform: translateY(-12px) rotate(-4deg);
  }
}

.hero__glass {
  position: relative;
  z-index: 2;
  width: min(720px, 100%);
  padding: clamp(36px, 6vw, 56px) clamp(28px, 5vw, 48px);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 30px 80px rgba(30, 60, 140, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(22px) saturate(1.35);
  -webkit-backdrop-filter: blur(22px) saturate(1.35);
  text-align: center;
  color: #fff;
}

.hero__eyebrow {
  margin: 0 0 8px;
  letter-spacing: 0.35em;
  font-size: 0.85rem;
  font-weight: 500;
  opacity: 0.7;
  text-indent: 0.35em;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.8rem, 8vw, 4.2rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.1;
}

.hero__title-cn {
  margin: 10px 0 0;
  font-size: clamp(1.15rem, 2.6vw, 1.45rem);
  font-weight: 500;
  opacity: 0.95;
}

.hero__tags {
  margin: 18px 0 0;
  letter-spacing: 0.22em;
  font-size: 0.82rem;
  opacity: 0.85;
  text-indent: 0.22em;
}

.hero__divider {
  width: min(220px, 50%);
  height: 1px;
  margin: 22px auto;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.85),
    transparent
  );
}

.hero__lead {
  margin: 0 auto;
  max-width: 34em;
  font-size: 0.98rem;
  line-height: 1.75;
  opacity: 0.92;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s, background 0.2s,
    color 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn--primary {
  background: #fff;
  color: var(--blue-deep);
  box-shadow: 0 12px 28px rgba(20, 40, 100, 0.2);
}

.btn--primary:hover {
  color: var(--blue);
  box-shadow: 0 16px 32px rgba(20, 40, 100, 0.28);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff;
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

/* Sections */
.section {
  padding: 96px 0;
}

.section__head {
  margin-bottom: 40px;
}

.section__eyebrow {
  margin: 0 0 8px;
  color: var(--blue);
  letter-spacing: 0.28em;
  font-size: 0.78rem;
  font-weight: 600;
  text-indent: 0.28em;
}

.section__head h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3.5vw, 2.35rem);
  letter-spacing: 0.04em;
}

.section__desc {
  margin: 12px 0 0;
  color: var(--ink-soft);
  max-width: 40em;
}

/* About */
.about {
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.55) 30%, transparent);
}

.about__grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 20px;
}

.about__card {
  background: var(--glass-strong);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius);
  padding: 28px 28px 30px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.about__card--wide {
  grid-column: 2;
  grid-row: 1;
}

.about__card--full {
  grid-column: 1 / -1;
}

.about__name {
  margin: 0;
  font-size: 1.75rem;
  letter-spacing: 0.06em;
}

.about__meta {
  margin: 6px 0 18px;
  color: var(--ink-soft);
}

.about__facts {
  margin: 0;
  display: grid;
  gap: 12px;
}

.about__facts div {
  display: grid;
  gap: 2px;
}

.about__facts dt {
  font-size: 0.78rem;
  color: var(--muted);
}

.about__facts dd {
  margin: 0;
  font-weight: 560;
}

.about__card h3 {
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.05rem;
}

.bar {
  width: 4px;
  height: 1em;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--blue), var(--blue-soft));
}

.about__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
  color: var(--ink-soft);
}

.about__list li {
  position: relative;
  padding-left: 18px;
}

.about__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue);
  opacity: 0.75;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 500;
}

.chip--strong {
  background: var(--blue-wash);
  color: var(--blue-deep);
  border-color: transparent;
}

.chip--soft {
  background: #f4f5f8;
  color: var(--muted);
}

.about__note {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Filters */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.filter {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.75);
  color: var(--ink-soft);
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}

.filter:hover {
  border-color: rgba(76, 124, 240, 0.35);
  color: var(--blue);
}

.filter.is-active {
  background: linear-gradient(135deg, var(--blue), var(--blue-soft));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 10px 22px rgba(76, 124, 240, 0.28);
}

.filter:focus-visible {
  outline-offset: 2px;
}

/* Project grid */
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.project {
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}

.project.is-hidden {
  display: none;
}

.project__hit {
  width: 100%;
  display: block;
  text-align: left;
  padding: 0;
  border: 0;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: zoom-in;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
  font: inherit;
  color: inherit;
}

.project__hit:hover,
.project__hit:focus-visible {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.project__media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--lavender);
}

.project__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.55s var(--ease);
}

.project__hit:hover .project__media img,
.project__hit:focus-visible .project__media img {
  transform: scale(1.04);
}

.project__body {
  padding: 18px 20px 22px;
}

.tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--blue);
  background: var(--blue-wash);
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.project__body h3 {
  margin: 10px 0 6px;
  font-size: 1.12rem;
  letter-spacing: 0.02em;
}

.project__body p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.6;
}

/* Contact */
.contact {
  position: relative;
  padding-top: 48px;
  padding-bottom: 80px;
  overflow: hidden;
}

.contact__bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, #6ea0ff 0%, #4c7cf0 45%, #8a9cff 100%);
  z-index: 0;
}

.contact .container {
  position: relative;
  z-index: 1;
}

.contact__glass {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: clamp(40px, 7vw, 64px) clamp(24px, 5vw, 48px);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 30px 80px rgba(30, 60, 140, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(22px) saturate(1.3);
  -webkit-backdrop-filter: blur(22px) saturate(1.3);
  text-align: center;
  color: #fff;
}

.contact__thanks-en {
  margin: 0;
  letter-spacing: 0.28em;
  opacity: 0.7;
  font-size: 0.95rem;
  text-indent: 0.28em;
}

.contact h2 {
  margin: 8px 0 0;
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-style: italic;
  font-weight: 700;
}

.contact__intro {
  margin: 0 0 28px;
  opacity: 0.92;
}

.contact__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px 36px;
}

.contact__list li {
  display: grid;
  gap: 4px;
  min-width: 140px;
}

.contact__label {
  font-size: 0.78rem;
  opacity: 0.72;
  letter-spacing: 0.08em;
}

.contact__list a,
.contact__list span:not(.contact__label) {
  color: #fff;
  font-weight: 600;
  font-size: 1.02rem;
}

.contact__list a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Footer */
.site-footer {
  background: #f4f6fb;
  border-top: 1px solid var(--line);
  padding: 22px 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 20px;
}

.site-footer p {
  margin: 0;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 24px;
}

.lightbox[hidden] {
  display: none !important;
}

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 24, 48, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: zoom-out;
}

.lightbox__dialog {
  position: relative;
  z-index: 1;
  width: min(1200px, 100%);
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  animation: pop 0.28s var(--ease);
}

@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.lightbox__close {
  position: absolute;
  top: -8px;
  right: -8px;
  z-index: 2;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.lightbox__close:hover {
  color: var(--blue);
}

.lightbox__figure {
  margin: 0;
  background: #0f1528;
  border-radius: 16px;
  overflow: auto;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

.lightbox__img {
  width: 100%;
  height: auto;
  max-height: calc(100vh - 110px);
  object-fit: contain;
  margin: 0 auto;
}

.lightbox__caption {
  padding: 14px 18px;
  color: #e8ecf8;
  font-size: 0.92rem;
  background: #161d34;
}

body.lightbox-open {
  overflow: hidden;
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Responsive */
@media (max-width: 900px) {
  .about__grid {
    grid-template-columns: 1fr;
  }

  .about__card--wide {
    grid-column: auto;
    grid-row: auto;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  .hero__rocket {
    width: 56px;
    opacity: 0.7;
  }

  .filter {
    font-size: 0.84rem;
  }
}

@media (max-width: 720px) {
  .nav__toggle {
    display: inline-block;
  }

  .nav__role {
    display: none;
  }

  .nav__menu {
    position: fixed;
    inset: var(--nav-h) 12px auto 12px;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
    transform-origin: top center;
    transform: translateY(-8px) scale(0.98);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
  }

  .nav__menu.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  .nav__menu a {
    padding: 12px 14px;
  }

  .section {
    padding: 72px 0;
  }

  .hero {
    padding-top: 48px;
    padding-bottom: 64px;
  }

  .lightbox__close {
    top: 4px;
    right: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero__rocket,
  .project__hit,
  .project__media img,
  .lightbox__dialog {
    animation: none !important;
    transition: none !important;
  }
}
