/* ============================================================
   In Development Studios inspired theme
   极简 / 黑白灰 / Manrope 大标题 / 细线分隔 / 克制动效
   This file overrides css/style.css without deleting the original theme.
   ============================================================ */

:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-alt: #f5f3f3;
  --text: #000000;
  --muted: #6f6f6f;
  --line: #e5e5e5;
  --primary: #000000;
  --primary-dark: #000000;
  --primary-soft: #f5f3f3;
  --accent: #000000;
  --dark: #000000;
  --radius: 2px;
  --radius-sm: 2px;
  --shadow: none;
  --shadow-sm: none;
  --font: Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  --display: Manrope, Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}

html {
  scroll-padding-top: 72px;
}

body {
  color: var(--text);
  background: var(--bg);
  font-family: var(--font);
  font-size: 14.4px;
  line-height: 1.6;
  letter-spacing: 0;
  overflow-x: hidden;
}

.skip-link {
  border-radius: 2px;
  color: #fff;
  background: #000;
}

::selection {
  color: #fff;
  background: #000;
}

a {
  color: inherit;
}

img {
  display: block;
}

.container {
  width: min(1280px, calc(100% - 64px));
}

/* ===================== 滚动进度条 ===================== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 260;
  width: 100%;
  height: 2px;
  background: #fff;
  mix-blend-mode: difference;
  transform: scaleX(0);
  transform-origin: left center;
  pointer-events: none;
}

/* ===================== 顶部导航 ===================== */
.site-header {
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.site-header.is-scrolled {
  box-shadow: none;
  border-bottom-color: #d8d8d8;
}

.nav-wrap {
  height: 72px;
}

.brand {
  font-family: var(--display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.brand span {
  margin-left: 8px;
  color: var(--muted);
  font-family: var(--font);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-nav {
  gap: 22px;
}

.nav-link {
  padding: 7px 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-link::after {
  bottom: 0;
  height: 1px;
  background: #000;
}

.nav-link:hover,
.nav-link.is-active {
  color: #000;
}

.nav-toggle {
  border: 1px solid #000;
  border-radius: 0;
  background: transparent;
}

.nav-toggle span {
  width: 18px;
  background: #000;
}

/* ===================== 通用模块 ===================== */
.section {
  position: relative;
  padding: clamp(80px, 11vw, 150px) 0;
  border-top: 1px solid var(--line);
  background: #fff;
}

.section-alt {
  background: var(--surface-alt);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.62fr);
  gap: 28px 56px;
  align-items: start;
  max-width: none;
  margin-bottom: 56px;
}

.section-kicker {
  grid-column: 1;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.section-kicker::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 10px;
  background: currentColor;
  vertical-align: middle;
}

.section-head h2 {
  grid-column: 1;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(46px, 7vw, 96px);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.055em;
}

.section-lead {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: end;
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.section-head-aside {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: start;
}

.section-head-aside .education-block {
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 0;
  padding-top: 24px;
}

.section-head-aside .education-meta {
  flex-direction: row;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.section-head-aside .education-body h3 {
  font-size: clamp(22px, 2.4vw, 32px);
}

.section-head-aside .education-body p {
  font-size: 14px;
}

/* ===================== 首屏 ===================== */
.hero {
  position: relative;
  min-height: 100vh;
  padding: 128px 0 72px;
  color: #000;
  background:
    linear-gradient(90deg, transparent 0, transparent calc(100% - 1px), rgba(0, 0, 0, 0.07) calc(100% - 1px)),
    #fff;
  background-size: 25% 100%;
}

.hero-inner {
  position: relative;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  gap: 72px;
  align-items: end;
  min-height: calc(100vh - 200px);
}

.hero-copy,
.hero-stats {
  position: relative;
  z-index: 2;
}

.eyebrow {
  margin: 0 0 24px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 0;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 10px;
  background: #000;
  vertical-align: middle;
}

.hero h1 {
  margin: 0;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero h1 span {
  display: block;
  margin-top: 8px;
  color: #000;
  font-family: var(--display);
  font-size: clamp(72px, 13vw, 184px);
  font-weight: 600;
  line-height: 0.86;
  letter-spacing: -0.07em;
}

.hero-subtitle {
  max-width: 560px;
  margin: 30px 0 0;
  color: #333;
  font-size: 17px;
  line-height: 1.65;
}

.hero-actions {
  gap: 12px;
  margin-top: 36px;
}

.btn {
  min-height: 44px;
  padding: 0 20px;
  border-radius: 6px 6px 0 0;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

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

.btn-primary {
  color: #fff;
  background: #000;
}

.btn-primary:hover {
  background: #222;
}

.btn-ghost {
  color: #000;
  border-color: #000;
  background: transparent;
}

.btn-ghost:hover {
  color: #fff;
  border-color: #000;
  background: #000;
}

.hero-stats {
  gap: 0;
  border-top: 1px solid #000;
}

.hero-stats .stat {
  padding: 16px 0 20px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
}

.hero-stats .stat:nth-child(odd) {
  padding-right: 18px;
  border-right: 1px solid var(--line);
}

.hero-stats .stat:nth-child(even) {
  padding-left: 18px;
}

.hero-stats strong {
  color: #000;
  font-family: var(--display);
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
}

.hero-stats span {
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.hero-art {
  position: absolute;
  right: 2%;
  top: 2%;
  z-index: 0;
  width: 300px;
  height: 300px;
  perspective: 900px;
  opacity: 0.8;
  transform: translateY(var(--hero-shift, 0));
  pointer-events: none;
}

.cube {
  position: relative;
  width: 148px;
  height: 148px;
  margin: 74px auto;
  transform-style: preserve-3d;
  animation: cube-spin 24s linear infinite;
}

.cube-face {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(0, 0, 0, 0.35);
  background: rgba(255, 255, 255, 0.45);
}

.cube-front { transform: translateZ(74px); }
.cube-back { transform: rotateY(180deg) translateZ(74px); }
.cube-left { transform: rotateY(-90deg) translateZ(74px); }
.cube-right { transform: rotateY(90deg) translateZ(74px); }
.cube-top { transform: rotateX(90deg) translateZ(74px); }
.cube-bottom { transform: rotateX(-90deg) translateZ(74px); }

@keyframes cube-spin {
  from { transform: rotateX(-22deg) rotateY(0deg); }
  to { transform: rotateX(-22deg) rotateY(360deg); }
}

.hero-scroll {
  position: absolute;
  left: 32px;
  bottom: 26px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-scroll span {
  display: inline-block;
  margin-left: 8px;
  animation: scroll-nudge 1.8s ease-in-out infinite;
}

@keyframes scroll-nudge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

/* ===================== 关键词跑马灯 ===================== */
.marquee {
  overflow: hidden;
  padding: 14px 0;
  color: #fff;
  background: #000;
  white-space: nowrap;
}

.marquee-track {
  display: inline-flex;
  min-width: max-content;
  animation: marquee-move 28s linear infinite;
}

.marquee-track span {
  padding-right: 42px;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

@keyframes marquee-move {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ===================== 关于我 ===================== */
.priority-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 64px;
  padding: 32px;
  color: #fff;
  background: #000;
  border-radius: 2px;
  box-shadow: none;
  text-align: center;
}

.priority-label {
  margin: 0;
  padding: 7px 13px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  color: #fff;
  background: transparent;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.priority-value {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(26px, 4vw, 52px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.04em;
  text-align: center;
}

.about-grid {
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
}

.about-card {
  padding: 28px 28px 28px 0;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.about-card + .about-card {
  padding-left: 28px;
}

.about-card:last-child {
  padding-right: 0;
  border-right: 0;
}

.card-icon {
  width: auto;
  height: auto;
  display: block;
  margin-bottom: 18px;
  border-radius: 0;
  background: transparent;
  font-size: 0;
}

.about-grid {
  counter-reset: about-card;
}

.about-card .card-icon::before {
  counter-increment: about-card;
  content: counter(about-card, decimal-leading-zero);
  color: #000;
  font-family: var(--display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.about-card h3 {
  margin: 0 0 12px;
  font-family: var(--display);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.about-card p {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.7;
}

.education-block {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 48px;
  margin-top: 64px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.education-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.education-body h3 {
  margin: 0 0 12px;
  font-family: var(--display);
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.education-body h3 span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-family: var(--font);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.education-body p {
  margin: 0;
  color: #444;
  font-size: 14.5px;
  line-height: 1.7;
}

.subsection-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.62fr);
  gap: 18px 56px;
  align-items: end;
  margin: 96px 0 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.subsection-head .section-kicker {
  grid-column: 1;
  margin: 0;
}

.subsection-head h3 {
  grid-column: 1;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.045em;
}

.subsection-head > p:last-child {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: end;
  margin: 0;
  color: var(--muted);
}

/* ===================== 个人亮点 ===================== */
.project-grid {
  grid-template-columns: repeat(2, 1fr);
  gap: 48px 24px;
}

.project-card {
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.project-visual {
  position: relative;
  height: auto;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 2px;
  font-size: 11px;
  letter-spacing: 0.2em;
}

.project-visual img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.project-card:hover .project-visual img {
  transform: scale(1.03);
}

.project-visual.visual-placeholder {
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.62);
  background:
    linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    #111;
  background-size: 24px 24px;
}

.project-visual.visual-placeholder span {
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.2em;
}

.project-visual.visual-placeholder::after {
  content: "IMAGE COMING SOON";
  position: absolute;
  right: 16px;
  bottom: 14px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 9px;
  letter-spacing: 0.14em;
}

.visual-a { color: #fff; background: #111; }
.visual-b { color: #000; background: #e9e9e9; }
.visual-c { color: #fff; background: #333; }
.visual-d { color: #000; background: #d8d8d8; }

.project-content {
  padding: 18px 0 0;
}

.project-tag {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project-content h3 {
  margin: 0 0 10px;
  font-family: var(--display);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.project-content > p {
  color: var(--muted);
  font-size: 14.5px;
}

.project-metrics {
  gap: 28px;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.project-metrics span {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.project-metrics strong {
  margin-bottom: 3px;
  color: #000;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* ===================== 工作经历 ===================== */
#experience {
  background: var(--surface-alt);
}

.timeline {
  gap: 0;
}

.timeline::before {
  display: none;
}

.timeline-item {
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 48px;
  padding: 34px 0;
  border: 0;
  border-top: 1px solid #dedede;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.timeline-item::before {
  display: none;
}

.timeline-meta {
  position: sticky;
  top: 100px;
  align-self: start;
  gap: 8px;
}

.time {
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.company {
  color: #000;
  font-size: 14px;
}

.timeline-body h3 {
  margin: 0 0 16px;
  font-family: var(--display);
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.timeline-body h3 span {
  display: block;
  margin: 8px 0 0;
  color: var(--muted);
  font-family: var(--font);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.timeline-body ul {
  padding-left: 0;
  list-style: none;
}

.timeline-body li {
  position: relative;
  margin: 9px 0;
  padding-left: 18px;
  color: #444;
  font-size: 14.5px;
  line-height: 1.7;
}

.timeline-body li::before {
  content: "";
  position: absolute;
  top: 0.72em;
  left: 0;
  width: 5px;
  height: 5px;
  background: #000;
}

/* ===================== 专业能力 ===================== */
.skill-grid {
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
}

.skill-card {
  padding: 28px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.skill-card:nth-child(odd) {
  padding-right: 28px;
  border-right: 1px solid var(--line);
}

.skill-card:nth-child(even) {
  padding-left: 28px;
}

.skill-card.skill-card-wide {
  grid-column: 1 / -1;
  padding: 28px 0 0;
  border-right: 0;
  border-bottom: 0;
}

.skill-card h3 {
  margin: 0 0 18px;
  font-family: var(--display);
  font-size: 28px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.tag-list {
  gap: 8px;
}

.tag-list li {
  padding: 6px 10px;
  border: 1px solid #d9d9d9;
  border-radius: 999px;
  color: #444;
  background: transparent;
  font-size: 12px;
}

/* ===================== 作品集 ===================== */
#portfolio {
  color: #fff;
  background: #000;
  border-top-color: rgba(255, 255, 255, 0.15);
}

#portfolio .section-kicker,
#portfolio .section-lead,
#portfolio .portfolio-count {
  color: rgba(255, 255, 255, 0.55);
}

#portfolio .section-head h2,
#portfolio .subsection-head h3 {
  color: #fff;
}

.portfolio-toolbar {
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.portfolio-filters {
  gap: 18px;
}

.filter-btn {
  gap: 0;
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid transparent;
  border-radius: 0;
  color: rgba(255, 255, 255, 0.55);
  background: transparent;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.filter-btn:hover {
  transform: none;
  color: #fff;
  border-bottom-color: rgba(255, 255, 255, 0.45);
}

.filter-btn span {
  min-width: 0;
  padding: 0 0 0 5px;
  color: inherit;
  background: transparent;
  font-size: 10px;
}

.filter-btn.is-active {
  color: #fff;
  border-bottom-color: #fff;
  background: transparent;
}

.filter-btn.is-active span {
  color: #fff;
  background: transparent;
}

.portfolio-grid {
  grid-template-columns: repeat(2, 1fr);
  gap: 52px 24px;
}

.portfolio-card {
  display: block;
  border: 0;
  border-radius: 0;
  color: #fff;
  background: transparent;
  box-shadow: none;
}

.portfolio-card:hover {
  transform: none;
  border-color: transparent;
  box-shadow: none;
}

.portfolio-thumb {
  border-radius: 2px;
}

.portfolio-thumb img {
  filter: grayscale(1) contrast(1.05);
  transition: filter 0.45s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.portfolio-card:hover .portfolio-thumb img,
.portfolio-card:focus-visible .portfolio-thumb img {
  filter: grayscale(0);
  transform: scale(1.03);
}

.portfolio-badge,
.portfolio-duration {
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff;
  background: rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(8px);
}

.portfolio-badge {
  border-radius: 999px;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.portfolio-duration {
  right: auto;
  left: 10px;
  border-radius: 999px;
  font-size: 10px;
}

.portfolio-play {
  background: rgba(0, 0, 0, 0.22);
}

.portfolio-play span {
  color: #000;
  background: #fff;
}

.portfolio-like {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 0;
  border: 0;
  color: #fff;
  background: transparent;
  cursor: pointer;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.7));
  transition: transform 0.25s ease, color 0.25s ease;
}

.portfolio-like:hover {
  transform: scale(1.08);
}

.portfolio-like:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}

.portfolio-like-icon {
  width: 24px;
  height: 24px;
  fill: transparent;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linejoin: round;
  transition: fill 0.25s ease, stroke 0.25s ease, filter 0.25s ease;
}

.portfolio-like-count {
  font-family: var(--im-mono);
  font-size: 10px;
  line-height: 1;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.85);
}

.portfolio-like.is-liked {
  color: #fe2c55;
}

.portfolio-like.is-liked .portfolio-like-icon {
  fill: #fe2c55;
  stroke: #fe2c55;
  filter: drop-shadow(0 0 10px rgba(254, 44, 85, 0.75));
  animation: heart-pop 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes heart-pop {
  0% { transform: scale(1); }
  35% { transform: scale(1.35); }
  70% { transform: scale(0.92); }
  100% { transform: scale(1); }
}

.portfolio-info {
  padding: 16px 0 0;
}

.portfolio-info strong {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.portfolio-info .portfolio-meta {
  margin-top: 7px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.portfolio-info .portfolio-description {
  display: block;
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  line-height: 1.6;
  letter-spacing: 0;
  text-transform: none;
}

.portfolio-empty {
  border-color: rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.6);
  background: transparent;
}

/* 作品集：按分类收起，悬停/点击展开 */
.portfolio-accordion {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.portfolio-category {
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  transition: background 0.35s ease;
}

.portfolio-category:hover,
.portfolio-category:focus-within,
.portfolio-category.is-open {
  background: rgba(255, 255, 255, 0.035);
}

.portfolio-category-toggle {
  width: 100%;
  display: grid;
  grid-template-columns: 56px minmax(220px, 0.85fr) minmax(160px, 1fr) auto 18px;
  gap: 24px;
  align-items: center;
  padding: 28px 0;
  border: 0;
  color: #fff;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.portfolio-category-index {
  color: rgba(255, 255, 255, 0.45);
  font-family: var(--display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.portfolio-category-title {
  font-family: var(--display);
  font-size: clamp(28px, 3.2vw, 46px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.045em;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.portfolio-category:hover .portfolio-category-title,
.portfolio-category:focus-within .portfolio-category-title,
.portfolio-category.is-open .portfolio-category-title {
  transform: translateX(5px);
}

.portfolio-category-meta {
  color: rgba(255, 255, 255, 0.5);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.portfolio-category-hint {
  justify-self: end;
  color: rgba(255, 255, 255, 0.45);
  font-size: 10px;
  letter-spacing: 0.14em;
}

.portfolio-category-hint::before {
  content: "HOVER";
}

.portfolio-category-icon {
  position: relative;
  justify-self: end;
  width: 16px;
  height: 16px;
}

.portfolio-category-icon::before,
.portfolio-category-icon::after {
  content: "";
  position: absolute;
  background: #fff;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.portfolio-category-icon::before {
  top: 7px;
  left: 0;
  width: 16px;
  height: 1px;
}

.portfolio-category-icon::after {
  top: 0;
  left: 7px;
  width: 1px;
  height: 16px;
}

.portfolio-detail {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 0.6s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease;
}

.portfolio-detail-inner {
  overflow: hidden;
}

.portfolio-video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px 20px;
  padding-bottom: 48px;
}

.portfolio-category:focus-within .portfolio-detail,
.portfolio-category.is-open .portfolio-detail {
  grid-template-rows: 1fr;
  opacity: 1;
}

.portfolio-category:focus-within .portfolio-category-icon::after,
.portfolio-category.is-open .portfolio-category-icon::after {
  transform: scaleY(0);
  opacity: 0;
}

@media (hover: hover) {
  .portfolio-category:hover .portfolio-detail {
    grid-template-rows: 1fr;
    opacity: 1;
  }

  .portfolio-category:hover .portfolio-category-icon::after {
    transform: scaleY(0);
    opacity: 0;
  }
}

@media (hover: none) {
  .portfolio-category-hint::before {
    content: "TAP";
  }
}

/* ===================== 个人标签 ===================== */
#personality {
  background: var(--surface-alt);
}

.personality-grid {
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1px;
  border-top: 1px solid var(--line);
  background: var(--line);
}

.personality-stack {
  gap: 1px;
  background: var(--line);
}

.personality-card,
.personality-card-featured {
  padding: 32px;
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

.personality-head {
  gap: 14px;
  margin-bottom: 22px;
}

.personality-head .card-icon {
  font-size: 0;
}

.personality-grid {
  counter-reset: personality-card;
}

.personality-card .card-icon::before {
  counter-increment: personality-card;
  content: counter(personality-card, decimal-leading-zero);
  color: #000;
  font-family: var(--display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.personality-head h3 {
  font-family: var(--display);
  font-size: 28px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.tag-group + .tag-group {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.tag-group-title {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.media-list {
  grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  gap: 8px;
}

.media-item {
  border: 0;
  border-radius: 0;
  background: #f5f3f3;
}

.media-item img {
  filter: grayscale(1) contrast(1.04);
  transition: filter 0.4s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.media-item:hover img,
.media-item:focus-within img {
  filter: grayscale(0);
  transform: scale(1.03);
}

.media-item span {
  padding: 8px 0;
  color: #555;
  font-size: 11px;
}

/* 个人标签：默认收起，悬停/点击展开 */
#personality {
  background: #fff;
}

.personality-accordion {
  border-top: 1px solid var(--line);
}

.personality-item {
  border-bottom: 1px solid var(--line);
  background: #fff;
  transition: background 0.35s ease;
}

.personality-item:hover,
.personality-item:focus-within,
.personality-item.is-open {
  background: #fafafa;
}

.personality-toggle {
  width: 100%;
  display: grid;
  grid-template-columns: 56px minmax(220px, 0.85fr) minmax(240px, 1fr) auto 18px;
  gap: 24px;
  align-items: center;
  padding: 28px 0;
  border: 0;
  color: #000;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.personality-index {
  color: var(--muted);
  font-family: var(--display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.personality-title {
  font-family: var(--display);
  font-size: clamp(28px, 3.2vw, 46px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.045em;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.personality-item:hover .personality-title,
.personality-item:focus-within .personality-title,
.personality-item.is-open .personality-title {
  transform: translateX(5px);
}

.personality-meta {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.personality-hint {
  justify-self: end;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.14em;
}

.personality-hint::before {
  content: "HOVER";
}

.personality-icon {
  position: relative;
  justify-self: end;
  width: 16px;
  height: 16px;
}

.personality-icon::before,
.personality-icon::after {
  content: "";
  position: absolute;
  background: #000;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.personality-icon::before {
  top: 7px;
  left: 0;
  width: 16px;
  height: 1px;
}

.personality-icon::after {
  top: 0;
  left: 7px;
  width: 1px;
  height: 16px;
}

.personality-detail {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 0.6s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease;
}

.personality-detail-inner {
  overflow: hidden;
}

.personality-detail .tag-group:last-child {
  padding-bottom: 36px;
}

.personality-detail .media-list {
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 10px;
}

.personality-item:focus-within .personality-detail,
.personality-item.is-open .personality-detail {
  grid-template-rows: 1fr;
  opacity: 1;
}

.personality-item:focus-within .personality-icon::after,
.personality-item.is-open .personality-icon::after {
  transform: scaleY(0);
  opacity: 0;
}

@media (hover: hover) {
  .personality-item:hover .personality-detail {
    grid-template-rows: 1fr;
    opacity: 1;
  }

  .personality-item:hover .personality-icon::after {
    transform: scaleY(0);
    opacity: 0;
  }
}

@media (hover: none) {
  .personality-hint::before {
    content: "TAP";
  }
}

/* ===================== 联系方式 ===================== */
#contact {
  color: #fff;
  background: #000;
  border-top-color: rgba(255, 255, 255, 0.15);
}

#contact .section-kicker,
#contact .section-lead {
  color: rgba(255, 255, 255, 0.55);
}

#contact .section-head h2 {
  color: #fff;
}

.contact-layout {
  grid-template-columns: 0.9fr 1.1fr;
  gap: 72px;
}

.contact-info {
  gap: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.contact-item {
  gap: 16px;
  padding: 18px 0;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0;
  color: #fff;
  background: transparent;
  box-shadow: none;
}

a.contact-item:hover {
  transform: none;
  border-color: rgba(255, 255, 255, 0.6);
}

.contact-icon {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  color: #fff;
  background: transparent;
  font-size: 0;
}

.contact-icon::before {
  color: #fff;
  font-family: var(--display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
}

.contact-item:nth-child(1) .contact-icon::before { content: "@"; }
.contact-item:nth-child(2) .contact-icon::before { content: "T"; }
.contact-item:nth-child(3) .contact-icon::before { content: "01"; }
.contact-item:nth-child(4) .contact-icon::before { content: "02"; }
}

.contact-item small {
  color: rgba(255, 255, 255, 0.45);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.contact-item strong {
  color: #fff;
  font-size: 15px;
  font-weight: 400;
}

.contact-form {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.contact-form label {
  margin-bottom: 26px;
}

.contact-form label span {
  margin-bottom: 6px;
  color: #fff;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.contact-form input,
.contact-form textarea {
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 0;
  color: #fff;
  background: transparent;
  font-size: 15px;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: rgba(255, 255, 255, 0.32);
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: #fff;
  box-shadow: none;
}

.contact-form .btn-primary {
  margin-top: 8px;
  color: #000;
  background: #fff;
}

.contact-form .btn-primary:hover {
  color: #fff;
  background: #222;
}

.form-tip {
  color: rgba(255, 255, 255, 0.4);
  font-size: 11px;
}

/* ===================== 页脚与工具 ===================== */
.site-footer {
  padding: 24px 0;
  color: rgba(255, 255, 255, 0.45);
  background: #000;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.footer-inner p {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.back-to-top {
  width: 42px;
  height: 42px;
  border: 1px solid #000;
  border-radius: 50%;
  color: #000;
  background: #fff;
}

.back-to-top:hover {
  color: #fff;
  background: #000;
}

.toast {
  border-radius: 2px;
  color: #000;
  background: #fff;
  font-size: 12px;
}

body.modal-open {
  overflow: hidden;
}

.video-modal-backdrop {
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(10px);
}

.video-modal-panel {
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 2px;
  background: #000;
  box-shadow: none;
}

.video-modal-info {
  padding: 18px 20px 22px;
  color: #fff;
}

.video-modal-category {
  color: rgba(255, 255, 255, 0.5);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.video-modal-info h3 {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 600;
}

.video-modal-close {
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
}

.video-modal-close:hover {
  color: #000;
  background: #fff;
}

/* ===================== 动效 ===================== */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===================== 平板 ===================== */
@media (max-width: 1024px) {
  .container {
    width: min(100% - 48px, 1280px);
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 56px;
    min-height: 0;
  }

  .hero-art {
    top: 4%;
    right: -40px;
    opacity: 0.45;
  }

  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .section-head,
  .subsection-head {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .section-lead,
  .subsection-head > p:last-child {
    grid-column: 1;
    grid-row: auto;
    max-width: 680px;
  }

  .section-head-aside {
    grid-column: 1;
    grid-row: auto;
  }

  .section-head-aside .education-meta {
    flex-direction: column;
  }

  .priority-card {
    grid-template-columns: 140px minmax(0, 1fr);
  }

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

  .personality-toggle {
    grid-template-columns: 48px minmax(180px, 0.9fr) minmax(200px, 1fr) 18px;
  }

  .personality-hint {
    display: none;
  }

  .portfolio-category-toggle {
    grid-template-columns: 48px minmax(180px, 0.9fr) minmax(140px, 1fr) 18px;
  }

  .portfolio-category-hint {
    display: none;
  }

  .portfolio-video-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===================== 手机 ===================== */
@media (max-width: 900px) {
  .site-nav {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px 24px 18px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: none;
  }

  .site-nav.is-open {
    display: flex;
  }

  .nav-link {
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    font-size: 11px;
  }

  .nav-toggle {
    display: flex;
  }

  .about-grid,
  .project-grid,
  .skill-grid,
  .portfolio-grid,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .about-card,
  .about-card + .about-card {
    padding: 24px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .skill-card:nth-child(odd),
  .skill-card:nth-child(even) {
    padding: 24px 0;
    border-right: 0;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 28px 0;
  }

  .timeline-meta {
    position: static;
  }

  .education-block {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .personality-toggle {
    grid-template-columns: 40px minmax(0, 1fr) 18px;
    grid-template-areas:
      "index title icon"
      "index meta icon";
    gap: 6px 16px;
    padding: 24px 0;
  }

  .personality-index {
    grid-area: index;
    align-self: start;
  }

  .personality-title {
    grid-area: title;
    font-size: 30px;
  }

  .personality-meta {
    grid-area: meta;
  }

  .personality-icon {
    grid-area: icon;
    align-self: center;
  }

  .personality-detail .media-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .portfolio-category-toggle {
    grid-template-columns: 40px minmax(0, 1fr) 18px;
    grid-template-areas:
      "index title icon"
      "index meta icon";
    gap: 6px 16px;
    padding: 24px 0;
  }

  .portfolio-category-index {
    grid-area: index;
    align-self: start;
  }

  .portfolio-category-title {
    grid-area: title;
    font-size: 30px;
  }

  .portfolio-category-meta {
    grid-area: meta;
  }

  .portfolio-category-icon {
    grid-area: icon;
    align-self: center;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 32px, 1280px);
  }

  .nav-wrap {
    height: 66px;
  }

  .site-nav {
    top: 66px;
    padding: 10px 16px 18px;
  }

  .hero {
    min-height: auto;
    padding: 104px 0 56px;
    background-size: 50% 100%;
  }

  .hero-art,
  .hero-scroll {
    display: none;
  }

  .hero h1 span {
    font-size: clamp(66px, 24vw, 120px);
  }

  .hero-subtitle {
    font-size: 15px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }

  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .section {
    padding: 64px 0;
  }

  .section-head h2 {
    font-size: clamp(42px, 14vw, 72px);
  }

  .priority-card {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 22px;
  }

  .priority-value {
    font-size: 25px;
  }

  .subsection-head {
    margin-top: 64px;
  }

  .project-grid,
  .portfolio-grid {
    gap: 40px;
  }

  .personality-card,
  .personality-card-featured {
    padding: 24px;
  }

  .personality-head h3 {
    font-size: 24px;
  }

  .media-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .personality-toggle {
    grid-template-columns: 32px minmax(0, 1fr) 18px;
    gap: 6px 12px;
    padding: 20px 0;
  }

  .personality-title {
    font-size: 24px;
  }

  .personality-detail .tag-group:last-child {
    padding-bottom: 28px;
  }

  .personality-detail .media-list {
    gap: 8px;
  }

  .portfolio-category-toggle {
    grid-template-columns: 32px minmax(0, 1fr) 18px;
    gap: 6px 12px;
    padding: 20px 0;
  }

  .portfolio-category-title {
    font-size: 24px;
  }

  .portfolio-video-grid {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-bottom: 36px;
  }

  .contact-layout {
    gap: 48px;
  }

  .footer-inner {
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cube {
    animation: none;
  }

  .marquee-track {
    animation: none;
  }

  .hero-scroll span {
    animation: none;
  }

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