/* ==========================================================================
   SUBBOREA · 亚寒带
   科技感深色个人站 —— 纯静态，可直接上传 Cloudflare Pages
   ========================================================================== */

:root {
  --bg: #080b10;
  --bg-2: #0b0f16;
  --bg-3: #0f141c;
  --surface: rgba(255, 255, 255, 0.025);
  --surface-hover: rgba(255, 255, 255, 0.05);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --ink: #e9eef5;
  --ink-2: #9aa7b8;
  --ink-3: #5f6b7d;
  --brand: #4dd6b0;
  --brand-2: #6aa8ff;
  --brand-soft: rgba(77, 214, 176, 0.12);
  --radius: 18px;
  --maxw: 1120px;
  --font: "Inter", "Noto Sans SC", -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
  --mono: "SF Mono", "JetBrains Mono", ui-monospace, Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
em { font-style: normal; }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.only-mobile { display: none; }

/* ---------- 顶部导航 ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background .35s ease, border-color .35s ease, backdrop-filter .35s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(8, 11, 16, .72);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.logo { display: flex; align-items: center; gap: 11px; }
.logo-mark {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: linear-gradient(150deg, rgba(77,214,176,.22), rgba(106,168,255,.10));
  border: 1px solid rgba(77,214,176,.32);
  color: var(--brand);
}
.logo-mark svg { width: 18px; height: 18px; }
.logo-text { font-weight: 700; font-size: 15px; letter-spacing: .14em; display: flex; align-items: baseline; gap: 8px; }
.logo-text em { font-weight: 400; font-size: 13px; color: var(--ink-3); letter-spacing: .08em; }

.nav-links { display: flex; align-items: center; gap: 34px; font-size: 14px; color: var(--ink-2); }
.nav-links a { position: relative; transition: color .2s ease; }
.nav-links a:hover { color: var(--ink); }
.nav-links a:not(.nav-cta)::after {
  content: ""; position: absolute; left: 0; bottom: -6px;
  width: 0; height: 1px; background: var(--brand); transition: width .28s ease;
}
.nav-links a:not(.nav-cta):hover::after { width: 100%; }
.nav-cta {
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  transition: border-color .2s ease, background .2s ease;
}
.nav-cta:hover { border-color: rgba(77,214,176,.55); background: var(--brand-soft); }

.nav-toggle {
  display: none; width: 40px; height: 40px;
  background: none; border: 1px solid var(--line-strong); border-radius: 10px;
  cursor: pointer; position: relative;
}
.nav-toggle span {
  position: absolute; left: 11px; right: 11px; height: 1.5px; background: var(--ink);
  transition: transform .3s ease, opacity .3s ease;
}
.nav-toggle span:nth-child(1) { top: 15px; }
.nav-toggle span:nth-child(2) { bottom: 15px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- 首屏 ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; padding: 120px 0 80px; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; pointer-events: none; }

.grid-lines {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 90px 90px;
  mask-image: radial-gradient(ellipse 70% 62% at 50% 40%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 70% 62% at 50% 40%, #000 20%, transparent 78%);
  opacity: .5;
}
.glow { position: absolute; border-radius: 50%; filter: blur(110px); opacity: .55; }
.glow-a { width: 560px; height: 560px; top: -180px; left: -120px; background: radial-gradient(circle, rgba(77,214,176,.42), transparent 68%); }
.glow-b { width: 620px; height: 620px; right: -180px; top: 40px; background: radial-gradient(circle, rgba(106,168,255,.30), transparent 68%); }
.aurora {
  position: absolute; left: 50%; top: -10%;
  width: 130%; height: 70%;
  transform: translateX(-50%);
  background: conic-gradient(from 210deg at 50% 0%, transparent 0deg, rgba(77,214,176,.10) 60deg, transparent 130deg, rgba(106,168,255,.09) 200deg, transparent 280deg);
  filter: blur(40px);
  opacity: .8;
  animation: auroraShift 18s ease-in-out infinite alternate;
}
@keyframes auroraShift {
  from { transform: translateX(-50%) rotate(0deg); }
  to   { transform: translateX(-52%) rotate(6deg); }
}

.hero-inner { position: relative; z-index: 2; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 13px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--brand);
  padding: 7px 15px;
  border: 1px solid rgba(77,214,176,.28);
  border-radius: 999px;
  background: rgba(77,214,176,.06);
  margin-bottom: 34px;
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--brand);
  box-shadow: 0 0 0 0 rgba(77,214,176,.6);
  animation: pulseDot 2.4s ease-out infinite;
}
@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 rgba(77,214,176,.55); }
  70% { box-shadow: 0 0 0 9px rgba(77,214,176,0); }
  100% { box-shadow: 0 0 0 0 rgba(77,214,176,0); }
}

.hero-title { display: flex; flex-direction: column; gap: 4px; margin-bottom: 28px; }
.hero-title .line-1 {
  font-size: clamp(52px, 11vw, 132px);
  font-weight: 700;
  letter-spacing: -.045em;
  line-height: .92;
  background: linear-gradient(105deg, #ffffff 8%, #b9e8da 42%, #8fb6ff 88%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 8px 40px rgba(77,214,176,.18));
}
.hero-title .line-2 {
  font-size: clamp(19px, 3.2vw, 30px);
  font-weight: 400;
  letter-spacing: .62em;
  color: var(--ink-2);
  padding-left: 6px;
}

.hero-sub { font-size: clamp(15px, 1.7vw, 18px); color: var(--ink-2); max-width: 560px; margin-bottom: 40px; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 56px; }
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 14px 26px;
  border-radius: 12px;
  font-size: 15px; font-weight: 500;
  border: 1px solid transparent;
  transition: transform .2s ease, background .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.btn svg { width: 17px; height: 17px; transition: transform .25s ease; }
.btn-primary {
  background: linear-gradient(135deg, var(--brand) 0%, #35bf9c 100%);
  color: #04120e;
  font-weight: 600;
  box-shadow: 0 10px 34px -12px rgba(77,214,176,.75);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 42px -12px rgba(77,214,176,.9); }
.btn-primary:hover svg { transform: translateX(4px); }
.btn-ghost { border-color: var(--line-strong); color: var(--ink); background: var(--surface); }
.btn-ghost:hover { border-color: rgba(255,255,255,.28); background: var(--surface-hover); transform: translateY(-2px); }

.hero-meta { display: flex; align-items: center; gap: 18px; font-family: var(--mono); font-size: 12.5px; color: var(--ink-3); letter-spacing: .1em; }
.hero-meta .sep { width: 26px; height: 1px; background: var(--line-strong); }

.scroll-hint { position: absolute; left: 50%; bottom: 34px; transform: translateX(-50%); z-index: 2; }
.scroll-hint span {
  display: block; width: 1px; height: 48px;
  background: linear-gradient(to bottom, transparent, var(--brand) 55%, transparent);
  animation: scrollHint 2.4s ease-in-out infinite;
}
@keyframes scrollHint {
  0%, 100% { opacity: .25; transform: scaleY(.55); }
  50%      { opacity: 1;   transform: scaleY(1); }
}

/* ---------- 通用区块 ---------- */
.section { position: relative; padding: 130px 0; }
.section-alt { background: linear-gradient(180deg, transparent, var(--bg-2) 12%, var(--bg-2) 88%, transparent); }

.sec-head { display: flex; align-items: baseline; gap: 18px; margin-bottom: 54px; position: relative; }
.sec-index { font-family: var(--mono); font-size: 12.5px; color: var(--brand); letter-spacing: .12em; opacity: .85; }
.sec-head h2 { font-size: clamp(26px, 3.4vw, 36px); font-weight: 600; letter-spacing: -.02em; }
.sec-head h2 em { font-weight: 300; font-size: .52em; color: var(--ink-3); margin-left: 12px; letter-spacing: .02em; }
.sec-note { margin-left: auto; font-size: 13px; color: var(--ink-3); }

/* ---------- 关于 ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.about-lead {
  font-size: clamp(21px, 2.6vw, 29px);
  line-height: 1.5;
  font-weight: 300;
  letter-spacing: -.01em;
  background: linear-gradient(120deg, #ffffff, #8fdcC7 70%, #9db9e8);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.about-body p { color: var(--ink-2); margin-bottom: 18px; font-size: 15.5px; }
.facts { list-style: none; margin-top: 32px; border-top: 1px solid var(--line); }
.facts li { display: flex; justify-content: space-between; gap: 20px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.facts span { color: var(--ink-3); }
.facts b { font-weight: 500; color: var(--ink); }

/* ---------- 作品 ---------- */
.works-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.work-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), border-color .35s ease, background .35s ease;
}
.work-card:hover { transform: translateY(-6px); border-color: rgba(77,214,176,.3); background: var(--surface-hover); }
.work-thumb {
  aspect-ratio: 16 / 9;
  position: relative;
  display: grid; place-items: center;
  background:
    radial-gradient(circle at 30% 30%, rgba(77,214,176,.14), transparent 60%),
    radial-gradient(circle at 75% 70%, rgba(106,168,255,.12), transparent 60%),
    var(--bg-3);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.work-thumb::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 34px 34px;
  opacity: .35;
  mask-image: radial-gradient(circle at 50% 50%, #000, transparent 75%);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000, transparent 75%);
}
.work-thumb .ph {
  position: relative; z-index: 1;
  font-family: var(--mono); font-size: 34px; font-weight: 300;
  color: rgba(255,255,255,.14);
  letter-spacing: .08em;
}
.work-body { padding: 24px 26px 28px; }
.work-tags { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.work-tags span {
  font-size: 11.5px; letter-spacing: .06em;
  padding: 3px 10px; border-radius: 999px;
  border: 1px solid var(--line-strong); color: var(--ink-3);
}
.work-body h3 { font-size: 19px; font-weight: 600; margin-bottom: 8px; }
.work-body p { font-size: 14.5px; color: var(--ink-2); }

/* ---------- 能力 ---------- */
.skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.skill {
  padding: 32px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color .3s ease, background .3s ease, transform .3s ease;
}
.skill:hover { border-color: rgba(106,168,255,.32); background: var(--surface-hover); transform: translateY(-4px); }
.skill svg { width: 26px; height: 26px; color: var(--brand); margin-bottom: 20px; }
.skill h3 { font-size: 17px; font-weight: 600; margin-bottom: 8px; }
.skill p { font-size: 14px; color: var(--ink-2); }

/* ---------- 联系 ---------- */
.contact-wrap { max-width: 780px; }
.contact-lead { font-size: clamp(20px, 2.4vw, 26px); font-weight: 300; color: var(--ink-2); margin-bottom: 40px; }
.contact-list { border-top: 1px solid var(--line); }
.contact-item {
  display: flex; align-items: center; gap: 20px;
  padding: 24px 6px;
  border-bottom: 1px solid var(--line);
  transition: padding-left .3s ease, background .3s ease;
}
a.contact-item:hover { padding-left: 16px; background: linear-gradient(90deg, var(--brand-soft), transparent 60%); }
.contact-item[aria-disabled="true"] { opacity: .5; cursor: default; }
.ci-label { width: 100px; flex: none; font-size: 13px; color: var(--ink-3); letter-spacing: .06em; }
.ci-value { flex: 1; font-size: 16px; }
a.contact-item .ci-value { color: var(--brand); }
.contact-item svg { width: 18px; height: 18px; color: var(--ink-3); flex: none; transition: transform .3s ease, color .3s ease; }
a.contact-item:hover svg { transform: translate(3px, -3px); color: var(--brand); }

/* ---------- 页脚 ---------- */
.footer { border-top: 1px solid var(--line); padding: 34px 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 13px; color: var(--ink-3); flex-wrap: wrap; }
.footer-mid { font-family: var(--mono); letter-spacing: .1em; }
.footer a:hover { color: var(--ink); }

/* ---------- 可点击的作品卡片 ---------- */
a.work-link { display: block; color: inherit; }
a.work-link .work-thumb::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: radial-gradient(circle at 50% 50%, rgba(77,214,176,.22), transparent 62%);
  opacity: 0; transition: opacity .35s ease;
}
a.work-link:hover .work-thumb::before { opacity: 1; }
a.work-link .work-thumb .ph { transition: transform .35s ease, color .35s ease; }
a.work-link:hover .work-thumb .ph { transform: scale(1.25); color: var(--brand); }
a.work-link h3::after {
  content: " →"; color: var(--brand); opacity: 0; transition: opacity .25s ease;
}
a.work-link:hover h3::after { opacity: 1; }

/* ---------- 入场动画 ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s cubic-bezier(.2,.8,.2,1), transform .8s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal:nth-child(2) { transition-delay: .08s; }
.reveal:nth-child(3) { transition-delay: .16s; }
.reveal:nth-child(4) { transition-delay: .24s; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .works-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr; }
  .sec-note { display: none; }
}

@media (max-width: 720px) {
  .wrap { padding: 0 20px; }
  .section { padding: 92px 0; }
  .hero { padding-top: 108px; }
  .nav-links {
    position: fixed; inset: 72px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(8,11,16,.97);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
    padding: 8px 20px 20px;
    transform: translateY(-120%);
    transition: transform .4s cubic-bezier(.2,.8,.2,1);
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: 15px 4px; border-bottom: 1px solid var(--line); font-size: 16px; }
  .nav-links a:not(.nav-cta)::after { display: none; }
  .nav-cta { text-align: center; margin-top: 14px; border-bottom: 0 !important; }
  .nav-toggle { display: block; }
  .hero-title .line-2 { letter-spacing: .42em; }
  .hero-meta { flex-wrap: wrap; gap: 10px; }
  .only-mobile { display: inline; }
  .ci-label { width: 76px; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
