/* 网站样式：复刻 incconutwo 个人站的玻璃质感与排版，背景使用茶米宇宙图。 */
:root {
  color-scheme: dark;
  --color-bg-primary: #0a0e27;
  --color-text-primary: #fff;
  --color-text-secondary: #ffffffd9;
  --color-text-muted: #fff9;
  --color-accent: #1f8a5f;
  --color-accent-hover: #2aa473;
  --font-display: "Syne", "Inter", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
  --text-sm: clamp(.875rem, 1.2vw, 1rem);
  --text-base: clamp(1rem, 1.5vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1.8vw, 1.25rem);
  --content-padding: clamp(1.5rem, 5vw, 4rem);
  --split-gap: clamp(2rem, 5vw, 6rem);
  --radius-lg: 24px;
  --radius-full: 9999px;
  --space-2: .5rem; --space-3: .75rem; --space-4: 1rem; --space-6: 1.5rem;
  --space-8: 2rem; --space-10: 2.5rem; --space-12: 3rem; --space-16: 4rem;
  --space-20: 5rem; --space-32: 8rem;
  --section-gap-v: clamp(4rem, 8vh, 10rem);
  --container-padding-v: clamp(3rem, 6vh, 8rem);
  --card-padding: clamp(1.5rem, 4vw, 2.5rem);
  --element-gap: clamp(1rem, 3vh, 2.5rem);
  --max-content-width: 1400px;
  --leading-relaxed: 1.7;
  --z-background: 1; --z-content: 10; --z-floating: 20; --z-cursor: 9999; --z-preloader: 10000;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body { margin: 0; min-height: 100vh; font-family: var(--font-body); font-size: var(--text-base); line-height: 1.5; color: var(--color-text-primary); background: var(--color-bg-primary); }
a { color: inherit; text-decoration: none; }
body.custom-cursor-active, body.custom-cursor-active * { cursor: none !important; }

#page-bg { position: fixed; inset: 0; z-index: var(--z-background); background: url('./assets/cosmic-horizon.png') center top / cover no-repeat; }
#page-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,14,39,.28), rgba(10,14,39,.55) 42%, rgba(10,14,39,.78)); }

#preloader { position: fixed; inset: 0; z-index: var(--z-preloader); display: flex; align-items: center; justify-content: center; background: #0a0e27; overflow: hidden; transition: transform .8s cubic-bezier(.76,0,.24,1); }
#preloader::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(#ffffff1a 1px, transparent 1px), linear-gradient(90deg, #ffffff1a 1px, transparent 1px); background-size: 50px 50px; transform: perspective(500px) rotateX(60deg); animation: 4s ease-in-out infinite gridPulse; }
body.loaded #preloader { transform: translateY(-100%); }
.loader-text { position: relative; z-index: 1; color: var(--color-accent); letter-spacing: 2px; font-family: monospace; animation: 1s infinite pulse; }
@keyframes gridPulse { 50% { opacity: .45; } }
@keyframes pulse { 50% { opacity: .4; } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fadeInScale { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: none; } }
@keyframes shine { to { background-position: 200%; } }
@keyframes quoteShine {
  0% { background-position: 100% 50%; }
  16% { background-position: 0% 50%; }
  16.01%, 100% { background-position: 100% 50%; }
}

.custom-cursor { position: fixed; top: 0; left: 0; width: 40px; height: 40px; z-index: var(--z-cursor); pointer-events: none; border: 2px solid #fffc; border-radius: 50%; mix-blend-mode: difference; transform: translate(-50%, -50%); transition: width .2s, height .2s, background .2s; }
.custom-cursor::before { content: ""; position: absolute; top: 50%; left: 50%; width: 6px; height: 6px; border-radius: 50%; background: #ffffffe6; transform: translate(-50%, -50%); }
.custom-cursor.hovering { width: 56px; height: 56px; background: #ffffff0d; }
.custom-cursor.is-off { display: none; }

.main-content { position: relative; z-index: var(--z-content); display: flex; flex-direction: column; min-height: 100vh; overflow-x: hidden; }

.hero { min-height: 100vh; display: flex; align-items: center; padding: var(--space-16) var(--content-padding); }
.hero-container { width: 100%; max-width: var(--max-content-width); margin: 0 auto; display: grid; grid-template-columns: 55% 45%; gap: var(--split-gap); align-items: center; }
.hero-content { display: flex; flex-direction: column; gap: var(--space-8); }
.headline-reveal { margin: 0 0 1.5rem; font-family: var(--font-display); font-size: clamp(2rem, 4vw, 3.5rem); font-weight: 800; line-height: 1.1; }
.line-mask { overflow: hidden; margin-bottom: .2rem; }
.reveal-item { display: block; transform: translateY(115%); }
body.loaded .reveal-item { transform: none; transition: transform .9s cubic-bezier(.22,1,.36,1); }
.headline-accent { color: var(--color-accent); }
.headline-white { color: var(--color-text-primary); }
.hero-bio { max-width: 520px; opacity: 0; animation: .8s .4s forwards fadeInUp; }
.hero-bio p { margin: 0 0 .7rem; }
.hero-bio p:first-child { font-size: var(--text-lg); font-weight: 600; color: #fff; }
.hero-bio p:last-child { margin-bottom: 0; }
.text-body { font-size: var(--text-base); line-height: var(--leading-relaxed); color: var(--color-text-secondary); max-width: 520px; }

.hero-projects-btn { display: inline-flex; align-items: center; gap: var(--space-2); width: fit-content; margin-top: var(--space-6); padding: var(--space-3) var(--space-6); border: 1px solid #b14cff59; border-radius: var(--radius-full); color: #fff; background: #b14cff1f; backdrop-filter: blur(12px) saturate(160%); -webkit-backdrop-filter: blur(12px) saturate(160%); font-family: var(--font-display); font-size: var(--text-sm); font-weight: 600; box-shadow: 0 8px 32px #00000040; opacity: 0; animation: .8s .5s forwards fadeInUp; transition: all .3s cubic-bezier(.25,1,.5,1); }
.hero-projects-btn:hover, .hero-projects-btn:focus-visible { border-color: var(--color-accent); background: #b14cff47; transform: translateY(-2px); box-shadow: 0 0 25px #b14cff66; }
.hero-projects-btn:active { transform: translateY(1px); }
.hero-projects-btn svg { width: 16px; height: 16px; fill: currentColor; transition: transform .3s; }
.hero-projects-btn:hover svg { transform: translateX(4px); }

.hero-profile { display: flex; justify-content: center; opacity: 0; animation: 1s .3s forwards fadeInScale; }
.profile-effect-container { width: 100%; max-width: 500px; }
.profile-effect-container svg { width: 100%; height: auto; aspect-ratio: 1; overflow: visible; }
.profile-glass-backdrop { fill: #ffffff14; }
.profile-image-transparent { opacity: .65; transition: opacity .3s; }
.profile-effect-container svg:hover .profile-image-transparent { opacity: .92; }
.text-content { fill: #fff9; font-size: 8px; letter-spacing: .12em; }

.content-container { width: 90%; max-width: 1200px; margin: 0 auto; position: relative; z-index: var(--z-floating); }
.section-header { margin-bottom: var(--element-gap); text-align: left; }
.cinematic-title { margin: 0; max-width: 100%; text-transform: uppercase; color: #fff3; font-family: var(--font-display); font-size: clamp(1.4rem, 8.2vw, 5rem); font-weight: 800; line-height: .95; transform: translateY(40px); opacity: 0; transition: transform .8s ease, opacity .8s ease; }
.cinematic-title .text-accent { display: block; color: #fff; white-space: nowrap; }
.cinematic-title.is-in { transform: none; opacity: 1; }
.projects-subtitle { color: var(--color-text-muted); font-size: var(--text-lg); font-weight: 400; }

.projects-section, .second-page, .connect-section, .inspiration-section { position: relative; z-index: var(--z-content); padding: var(--section-gap-v) var(--content-padding); }
.projects-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1rem, 2vw, 2rem); max-width: 1400px; }
.glass-card { position: relative; padding: var(--card-padding); border: 1px solid #ffffff14; border-radius: 24px; background: #ffffff08; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); overflow: hidden; transition: transform .4s, box-shadow .4s, border-color .4s; }
.glass-card::before { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; background: linear-gradient(115deg, transparent 0 40%, #ffffff1f 50%, transparent 60% 100%) 160% 0 / 250% 100%; transition: background-position .5s; }
.glass-card:hover, .glass-card:focus-visible { border-color: #fff3; transform: translateY(-10px); box-shadow: 0 20px 40px #0006; }
.glass-card:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; }
.glass-card:hover::before { background-position: -60% 0; }

.project-card { display: flex; flex-direction: column; min-height: 280px; color: #fff; }
.project-kicker { margin: 0 0 12px; color: var(--color-accent); letter-spacing: .12em; text-transform: uppercase; font-size: .8rem; font-weight: 600; }
.project-card h3 { margin: 0 0 auto; font-family: var(--font-display); font-size: clamp(1.8rem, 3vw, 2.6rem); font-weight: 800; }
.project-desc { margin: 16px 0 20px; color: var(--color-text-muted); font-size: var(--text-sm); line-height: 1.5; }
.project-link { display: inline-flex; align-items: center; width: fit-content; margin-top: auto; padding: .45rem .9rem; border: 1px solid #ffffff2e; border-radius: var(--radius-full); color: #fff; background: #ffffff12; font-size: .92rem; font-weight: 600; transition: background .3s, border-color .3s; }
.project-card:hover .project-link, .project-card:focus-visible .project-link { background: #ffffff22; border-color: #fff6; }

.about-copy { max-width: 720px; font-size: clamp(1.15rem, 2vw, 1.45rem); line-height: 1.85; color: var(--color-text-secondary); }
.about-copy p { margin: 0 0 1.1rem; }
.about-copy p:last-child { margin-bottom: 0; }

.connect-lead { display: flex; align-items: center; gap: .75rem; margin: .85rem 0 0; color: #ffffff8c; font-size: var(--text-lg); }
.connect-lead::before { content: ""; width: 3px; height: 1.1em; border-radius: 99px; background: #ffffff55; }

.social-ledger { display: flex; flex-direction: column; margin-top: var(--space-8); }
.ledger-item { position: relative; display: flex; align-items: center; gap: 1.4rem; overflow: hidden; padding: 1.15rem 1rem; border-bottom: 1px solid #ffffff1a; text-decoration: none; transition: background .3s, filter .3s; }
.ledger-item:hover, .ledger-item:focus-visible { background: #ffffff12; filter: brightness(1.18); }
.ledger-item:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.ledger-index { flex: 0 0 auto; color: var(--color-text-muted); font-family: var(--font-display); font-size: .95rem; }
.ledger-copy { display: flex; flex-direction: column; gap: .2rem; flex: 1; min-width: 0; }
.ledger-name { color: #fff; font-family: var(--font-display); font-size: clamp(1.5rem, 2.5vw, 2.4rem); font-weight: 700; }
.ledger-handle { color: var(--color-text-muted); font-size: 1rem; }
.ledger-visit { flex: 0 0 auto; padding: .35rem .75rem; border: 1px solid #ffffff2e; border-radius: var(--radius-full); color: #fff; font-size: .82rem; font-weight: 700; letter-spacing: .04em; opacity: 0; transform: translateX(8px); transition: opacity .3s, transform .3s; }
.ledger-item:hover .ledger-visit, .ledger-item:focus-visible .ledger-visit { opacity: 1; transform: none; }

.inspiration-wrapper { display: flex; flex-direction: column; align-items: center; gap: var(--space-8); max-width: 1000px; margin: 0 auto; text-align: center; }
.inspiration-label { color: var(--color-text-muted); text-transform: uppercase; letter-spacing: .16em; font-family: monospace; font-size: .95rem; opacity: .8; }
.inspiration-label .bracket { color: var(--color-accent); }
.quote-zh { margin: 0; color: #fff; font-family: var(--font-display); font-size: clamp(1.7rem, 4vw, 2.8rem); font-weight: 800; line-height: 1.35; letter-spacing: .08em; text-align: center; }
.quote-en-lines { display: flex; flex-direction: column; align-items: center; gap: .55rem; }
.quote-en {
  display: inline-block;
  margin: 0;
  color: #fff;
  background-image: linear-gradient(90deg, #ffffff 18%, #dcc8ff 50%, #ffffff 82%);
  background-size: 220% 100%;
  background-position: 100% 50%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3.2vw, 2.3rem);
  font-weight: 800;
  line-height: 1.25;
  animation: quoteShine 8s linear infinite;
}
.quote-en:nth-child(1) { animation-delay: 0s; }
.quote-en:nth-child(2) { animation-delay: 1.4s; }
.quote-en:nth-child(3) { animation-delay: 2.8s; }
.quote-en-soft {
  color: #cbb0ff;
  background-image: linear-gradient(90deg, #cbb0ff 18%, #fff 50%, #cbb0ff 82%);
}

.footer-info { text-align: center; padding: 0 var(--content-padding) var(--space-12); }
.footer-en, .footer-zh { margin: 0; color: #fff; font-size: .78rem; font-weight: 400; opacity: .28; }
.footer-en { margin-bottom: .35rem; }
.footer-zh { letter-spacing: .04em; }

@media (max-width: 1024px) {
  .hero { justify-content: center; padding: var(--space-12) var(--content-padding); }
  .hero-container { grid-template-columns: 1fr; text-align: center; gap: 1.75rem; }
  .hero-content { align-items: center; order: 2; gap: var(--space-4); }
  .hero-bio { margin: 0 auto; }
  .hero-profile { order: 1; max-width: min(250px, 55vw); margin: 0 auto; }
  .projects-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .hero { min-height: 100dvh; padding: var(--space-8) var(--content-padding); }
  .ledger-item { padding-left: .4rem; padding-right: .4rem; }
  .ledger-visit { font-size: .74rem; }
}
@media (hover: none) {
  .ledger-visit { opacity: .9; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal-item, .hero-bio, .hero-projects-btn, .hero-profile, .cinematic-title, .quote-en { opacity: 1; transform: none; animation: none; }
  .quote-en { background-position: 50% 50%; }
}
