/* ========== Hero ========== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 120px 60px 80px;
}

/* ===== Hero 入场动画 (stagger fade-in) ===== */
@keyframes heroFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero__top-mark,
.hero__case,
.hero__name,
.hero__sub,
.hero__deco-1,
.hero__deco-2,
.hero__log {
  animation: heroFadeIn 0.9s cubic-bezier(.2, .8, .25, 1) both;
}
.hero__top-mark { animation-delay: 0.15s; }
.hero__case     { animation: heroFadeUp 0.9s 0.35s cubic-bezier(.2, .8, .25, 1) both, casePulse 3s 1.6s infinite; }
.hero__name     { animation: heroFadeUp 1.2s 0.5s cubic-bezier(.2, .8, .25, 1) both; }
.hero__sub      { animation: heroFadeUp 0.9s 0.95s cubic-bezier(.2, .8, .25, 1) both; }
.hero__deco-1   { animation-delay: 1.1s; }
.hero__deco-2   { animation-delay: 1.2s; }
.hero__log      { animation-delay: 1.3s; }

/* hero__case 红框轻微脉冲 */
@keyframes casePulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(230, 57, 70, 0.45);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(230, 57, 70, 0);
  }
}

/* hero__top-mark 圆点呼吸 */
@keyframes topMarkPulse {
  0%, 100% {
    box-shadow: 0 0 14px rgba(255,255,255,0.6),
                0 0 0 0 rgba(255,255,255,0.4);
  }
  50% {
    box-shadow: 0 0 14px rgba(255,255,255,0.6),
                0 0 0 14px rgba(255,255,255,0);
  }
}
.hero__top-mark {
  animation: heroFadeIn 0.9s 0.15s cubic-bezier(.2, .8, .25, 1) both,
             topMarkPulse 2.6s 1s infinite;
}
.hero__scroll {
  margin-top: 60px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.25em;
  color: var(--text-faint);
  text-transform: uppercase;
}
.hero__scroll .arr-down {
  font-size: 14px;
  color: var(--accent);
  animation: arrDown 2.4s infinite;
}
@keyframes arrDown {
  0%, 100% { transform: translateY(0); opacity: 0.4; }
  50% { transform: translateY(6px); opacity: 1; }
}
.hero__top-mark {
  position: absolute;
  top: 64px; left: 50%; transform: translateX(-50%);
  width: 10px; height: 10px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 14px rgba(255,255,255,0.6);
}
.hero__case {
  margin-bottom: 38px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 8px 18px;
}
.hero__name {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(80px, 14vw, 220px);
  line-height: 0.86;
  letter-spacing: -0.02em;
  text-align: center;
  background: linear-gradient(180deg, #ffffff 0%, #c9c9c9 60%, #6f6f6f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  position: relative;
}
.hero__name .crosshair-mini {
  position: absolute;
  width: 14px; height: 14px;
  border: 1.5px solid var(--accent);
}
.hero__name .crosshair-mini::after {
  content: '';
  position: absolute;
  width: 4px; height: 4px;
  background: var(--accent);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}
.hero__sub {
  margin-top: 50px;
  text-align: center;
  font-size: 16px;
  color: var(--text);
  line-height: 2;
  letter-spacing: 0.04em;
}
.hero__sub b { color: var(--accent); font-weight: 500; }
.hero__sub .muted { color: var(--text-dim); }

.hero__deco-1 {
  position: absolute;
  top: 200px; left: 12%;
  transform: rotate(-2deg);
}
.hero__deco-1 .row { display: block; line-height: 1.6; }
.hero__deco-2 {
  position: absolute;
  top: 180px; right: 10%;
  width: 180px; height: 130px;
  background: linear-gradient(135deg, #1a1a1a, #0a0a0a);
  border: 1px solid var(--border-strong);
  transform: rotate(4deg);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 10px;
}
.hero__deco-2 .photo-fake {
  flex: 1;
  background:
    repeating-linear-gradient(45deg, #1f1f1f 0 2px, #161616 2px 4px);
  margin-bottom: 6px;
  position: relative;
}
.hero__deco-2 .photo-fake::after {
  content: '';
  position: absolute; inset: 8px;
  border: 1px dashed rgba(255,255,255,0.15);
}
.hero__deco-2 .photo-cap {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-dim);
  letter-spacing: 0.1em;
}

.hero__log {
  position: absolute;
  right: 8%; bottom: 26%;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  text-align: right;
  line-height: 1.9;
  opacity: 0.85;
}

.hero__3d {
  position: absolute;
  right: var(--hud-pad);
  bottom: 80px;
  width: 200px;
  border: 1px solid var(--border-strong);
  background: rgba(10,10,10,0.85);
  padding: 14px 16px;
  font-family: var(--font-mono);
}
.hero__3d .lab { font-size: 9px; color: var(--text-dim); letter-spacing: 0.2em; }
.hero__3d .big {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 600;
  margin: 4px 0 6px;
}
.hero__3d .avail { font-size: 10px; color: var(--accent); letter-spacing: 0.18em; }
.hero__3d .cube {
  position: absolute;
  left: 14px; bottom: 14px;
  width: 28px; height: 28px;
  border: 1.5px solid var(--accent);
  transform: rotate(45deg) skew(-10deg, -10deg);
}

/* ========== Section header (shared) ========== */
.section {
  position: relative;
  padding: 80px 60px 100px;
  border-top: 1px solid var(--border);
}
.section__head {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 40px;
  gap: 40px;
  flex-wrap: wrap;
}
.section__title {
  font-family: var(--font-serif);
  font-size: clamp(24px, 3.2vw, 48px);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1;
}
.section__title .slash {
  display: inline-block;
  width: 3px; height: 0.7em;
  background: var(--accent);
  margin: 0 0.4em -0.04em;
  transform: rotate(20deg);
}
.section__meta {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--text-dim);
  text-align: right;
  line-height: 1.9;
}
.section__meta .accent { color: var(--accent); }

/* ========== Projects toolbar ========== */
.projects-bar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 28px;
  gap: 24px;
}
.view-switch { display: flex; gap: 0; }
.view-switch button {
  display: inline-flex; align-items: center; gap: 8px;
  height: 36px;
  padding: 0 18px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--text-dim);
  border: 1px solid var(--border-strong);
  background: transparent;
  transition: all .25s;
}
.view-switch button + button { border-left: none; }
.view-switch button.is-active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}
.view-switch .ic {
  width: 12px; height: 12px;
  display: inline-block;
  border: 1px solid currentColor;
  position: relative;
}
.view-switch .ic--slider::after {
  content: '';
  position: absolute; inset: 2px;
  border-left: 1px solid currentColor;
  border-right: 1px solid currentColor;
}
.view-switch .ic--list { border: none; }
.view-switch .ic--list::before, .view-switch .ic--list::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 1px; background: currentColor;
}
.view-switch .ic--list::before { top: 2px; box-shadow: 0 4px 0 currentColor, 0 8px 0 currentColor; }
.view-switch .ic--list::after { display: none; }

.nav-arrows { display: flex; gap: 0; }
.nav-arrows button {
  width: 42px; height: 36px;
  border: 1px solid var(--border-strong);
  color: var(--text-dim);
  font-size: 14px;
  transition: all .25s;
}
.nav-arrows button + button { border-left: none; }
.nav-arrows button:hover { color: var(--accent); border-color: var(--accent-line); }

/* ========== Projects: SLIDER mode ========== */
.projects {
  position: relative;
}
.projects[data-mode="slider"] .projects__list { display: none; }
.projects[data-mode="list"] .projects__slider { display: none; }

.projects__slider {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding-bottom: 20px;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) transparent;
}
.projects__slider::-webkit-scrollbar { height: 4px; }
.projects__slider::-webkit-scrollbar-thumb { background: var(--accent); }

.proj-card {
  flex: 0 0 260px;
  height: 580px;
  position: relative;
  overflow: hidden;
  background: var(--panel-solid);
  border: 1px solid var(--border);
  scroll-snap-align: start;
  cursor: pointer;
  transition: flex-basis .65s cubic-bezier(.7,.05,.2,1),
              border-color .3s,
              transform .5s;
}
.proj-card:hover,
.proj-card.is-active {
  flex-basis: 400px;
  border-color: var(--accent-line);
}
.proj-card__media {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  filter: grayscale(0.85) brightness(0.55);
  transition: filter .6s, transform .8s;
}
.proj-card:hover .proj-card__media,
.proj-card.is-active .proj-card__media {
  filter: grayscale(0.3) brightness(0.75);
  transform: scale(1.04);
}
.proj-card__media--placeholder {
  background:
    radial-gradient(ellipse at 30% 30%, rgba(255,255,255,0.06), transparent 60%),
    repeating-linear-gradient(135deg, #1a1a1a 0 6px, #0e0e0e 6px 12px);
}
.proj-card__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.85) 100%);
}
.proj-card__tag-vert {
  position: absolute;
  top: 20px; right: 18px;
  writing-mode: vertical-rl;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--accent);
}
.proj-card__index {
  position: absolute;
  left: 22px; bottom: 96px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--accent);
}
.proj-card__title {
  position: absolute;
  left: 22px; bottom: 50px;
  right: 22px;
  font-family: var(--font-serif);
  font-size: 36px;
  line-height: 1;
  font-weight: 400;
}
.proj-card__cta {
  position: absolute;
  left: 22px; bottom: 22px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--text-dim);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .4s .1s, transform .4s .1s, color .25s;
}
.proj-card:hover .proj-card__cta,
.proj-card.is-active .proj-card__cta {
  opacity: 1;
  transform: translateY(0);
  color: var(--accent);
}
.proj-card__corners > span {
  position: absolute;
  width: 18px; height: 18px;
  border: 1.5px solid var(--accent);
  opacity: 0; transition: opacity .35s;
}
.proj-card:hover .proj-card__corners > span,
.proj-card.is-active .proj-card__corners > span { opacity: 0.85; }
.proj-card__corners .c1 { top: 10px; left: 10px; border-right: none; border-bottom: none; }
.proj-card__corners .c2 { top: 10px; right: 10px; border-left: none; border-bottom: none; }
.proj-card__corners .c3 { bottom: 10px; left: 10px; border-right: none; border-top: none; }
.proj-card__corners .c4 { bottom: 10px; right: 10px; border-left: none; border-top: none; }

/* dim non-hovered cards */
.projects__slider:hover .proj-card:not(:hover) .proj-card__media { filter: grayscale(1) brightness(0.35); }

/* ========== Projects: LIST mode ========== */
.projects__list {
  display: flex;
  flex-direction: column;
  height: 540px;
  overflow-y: auto;
  border-top: 1px solid var(--border);
  scrollbar-width: thin;
  scrollbar-color: var(--accent-line) transparent;
}
.projects__list::-webkit-scrollbar { width: 4px; }
.projects__list::-webkit-scrollbar-thumb { background: var(--accent-line); }

.proj-row {
  position: relative;
  display: grid;
  grid-template-columns: 110px 60px 1fr auto auto;
  align-items: center;
  gap: 22px;
  height: 88px;
  padding: 0 22px 0 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  overflow: hidden;
  transition: height .55s cubic-bezier(.7,.05,.2,1), background .4s;
  flex-shrink: 0;
}
.proj-row:hover { height: 140px; background: rgba(255,255,255,0.025); }

.proj-row__thumb {
  width: 110px;
  height: 100%;
  position: relative;
  overflow: hidden;
  align-self: stretch;
}
.proj-row__thumb-img {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(255,255,255,0.06), transparent 60%),
    repeating-linear-gradient(135deg, #1c1c1c 0 6px, #131313 6px 12px);
  filter: grayscale(0.7) brightness(0.7);
  transition: filter .5s, transform .8s;
}
.proj-row:hover .proj-row__thumb-img {
  filter: grayscale(0.2) brightness(0.95);
  transform: scale(1.06);
}

.proj-row__num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--accent);
}
.proj-row__title {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 400;
  line-height: 1;
  transition: font-size .4s;
}
.proj-row:hover .proj-row__title { font-size: 32px; }

.proj-row__cat {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--text-dim);
}
.proj-row__cta {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--text-dim);
  display: inline-flex; align-items: center; gap: 8px;
  transition: color .25s;
}
.proj-row:hover .proj-row__cta { color: var(--accent); }
.proj-row__cta .arr { transition: transform .4s; }
.proj-row:hover .proj-row__cta .arr { transform: translateX(6px); }

/* ========== Profile (snapshot) ========== */
.profile {
  display: grid;
  grid-template-columns: 320px 1fr 280px;
  gap: 28px;
}
.profile__panel {
  background: rgba(20, 20, 20, 0.8);
  border: 1px solid var(--border);
  padding: 22px;
  position: relative;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.profile__panel--avatar {
  display: flex;
  flex-direction: column;
}
.profile__name {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.25em;
  text-align: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
}
.profile__avatar {
  width: 100%;
  aspect-ratio: 1/1.15;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(255,255,255,0.1), transparent 60%),
    repeating-linear-gradient(180deg, #1c1c1c 0 4px, #131313 4px 8px);
  position: relative;
  margin-bottom: 18px;
  filter: grayscale(0.6);
}
.profile__avatar::before {
  content: 'ID_FACE_ID: 99.8%';
  position: absolute;
  bottom: 6px; left: 6px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--accent);
}
.profile__avatar::after {
  content: '';
  position: absolute;
  left: 8px; right: 8px;
  top: 60%;
  height: 1px;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
  animation: scan 3.5s infinite;
}
@keyframes scan {
  0% { top: 18%; opacity: 0.2; }
  50% { top: 80%; opacity: 1; }
  100% { top: 18%; opacity: 0.2; }
}
.profile__meta {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 14px 18px;
  font-family: var(--font-mono);
  font-size: 11px;
}
.profile__meta dt { color: var(--text-faint); font-size: 9px; letter-spacing: 0.18em; margin-bottom: 4px; }
.profile__meta dd { color: var(--text); }
.profile__open {
  margin-top: 22px;
  border: 1px solid var(--accent-line);
  padding: 14px;
  background: var(--accent-soft);
}
.profile__open .pulse {
  display: inline-block;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  margin-right: 8px;
  animation: blink 1.4s infinite;
}
.profile__open .small { font-size: 9px; letter-spacing: 0.2em; color: var(--accent); }
.profile__open .big { font-family: var(--font-serif); font-size: 22px; margin-top: 4px; line-height: 1; }
.profile__open .ctx {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--text-dim);
  display: flex; justify-content: space-between;
}

.profile__panel--report {
  padding: 26px 30px;
}
.profile__report-head {
  display: flex; justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--accent);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--accent-line);
  margin-bottom: 22px;
}
.profile__report-head .ro { color: var(--text-faint); }
.profile__bio {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 30px;
}
.profile__bio mark {
  background: var(--accent-soft);
  color: var(--accent);
  padding: 2px 6px;
  border: 1px solid var(--accent-line);
}
.profile__section { margin-top: 26px; }
.profile__section .lab {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--text-dim);
  margin-bottom: 14px;
}
.profile__entry {
  border-left: 2px solid var(--accent);
  padding: 4px 0 4px 16px;
  margin-bottom: 16px;
}
.profile__entry .top {
  display: flex; gap: 12px; align-items: center;
  margin-bottom: 6px;
}
.profile__entry .org {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.18em;
}
.profile__entry .yr {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
  background: rgba(255,255,255,0.04);
  padding: 2px 8px;
  border: 1px solid var(--border);
}
.profile__entry .desc {
  color: var(--text);
  font-size: 14px;
}

.profile__panel--skills {
  padding: 22px;
}
.profile__skills-head {
  display: flex; justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--text-dim);
  margin-bottom: 18px;
}
.profile__skills-group { margin-bottom: 22px; }
.profile__skills-group .lab {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 12px;
}
.skill-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.skill-grid > span {
  border: 1px solid var(--border-strong);
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  text-align: center;
  letter-spacing: 0.05em;
  transition: all .25s;
}
.skill-grid > span:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.profile__more {
  margin-top: 30px;
  text-align: center;
}

/* ========== Footer ========== */
.site-foot {
  border-top: 1px solid var(--border);
  padding: 40px 60px 80px;
  display: flex; justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--text-faint);
}

@media (max-width: 1100px) {
  .profile { grid-template-columns: 1fr; }
  .hero__deco-1, .hero__deco-2, .hero__log, .hero__3d { display: none; }
}
@media (max-width: 720px) {
  .section { padding: 60px 20px 80px; }
  .hero { padding: 100px 20px 60px; }
  .proj-card { flex-basis: 80vw; height: 60vh; }
  .proj-card:hover, .proj-card.is-active { flex-basis: 88vw; }
  .proj-row { grid-template-columns: 50px 1fr; }
  .proj-row__cat, .proj-row__cta { display: none; }
}
