/* ============================================================
   Danqi Huang — Portfolio 2018–2025
   Editorial style · navy / orange / ivory
   ============================================================ */

:root {
  --navy: #0E1B2C;
  --navy-2: #16283D;
  --navy-3: #20354F;
  --orange: #E8622C;
  --orange-deep: #C94E1E;
  --orange-soft: #F4A37E;
  --ivory: #F5F2EC;
  --paper: #FBFAF7;
  --ink: #171A20;
  --ink-soft: #555B66;
  --line: #E2DDD3;
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", Georgia, serif;
  --sans: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --mono: "SF Mono", "JetBrains Mono", "Roboto Mono", Consolas, monospace;
  --maxw: 1180px;
  --maxw-wide: 1320px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

::selection { background: var(--orange); color: #fff; }

/* 滚动进度条 */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: linear-gradient(90deg, var(--orange), var(--orange-soft));
  z-index: 200; transition: width .1s linear;
}

/* ---------- 导航 ---------- */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 5vw;
  transition: background .35s ease, box-shadow .35s ease, padding .35s ease;
}
.site-nav.scrolled {
  background: rgba(14, 27, 44, .92);
  backdrop-filter: blur(12px);
  padding: 14px 5vw;
  box-shadow: 0 1px 0 rgba(255,255,255,.06);
}
.nav-brand {
  font-family: var(--serif); color: #fff; text-decoration: none;
  font-size: 19px; letter-spacing: .04em; font-weight: 600;
}
.brand-dot { color: var(--orange); }
.nav-links { display: flex; gap: 34px; }
.nav-links a {
  color: rgba(255,255,255,.78); text-decoration: none; font-size: 14.5px;
  letter-spacing: .12em; transition: color .25s; position: relative;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -6px; width: 0; height: 1.5px;
  background: var(--orange); transition: width .3s;
}
.nav-links a:hover, .nav-links a.active { color: #fff; }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: #fff; margin: 5px 0; transition: .3s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- HERO ---------- */
.hero {
  min-height: 100vh;
  background:
    radial-gradient(1200px 700px at 78% -10%, rgba(232,98,44,.16), transparent 60%),
    radial-gradient(900px 600px at -10% 110%, rgba(255,255,255,.05), transparent 55%),
    linear-gradient(160deg, #0A1420 0%, var(--navy) 55%, var(--navy-2) 100%);
  color: #fff;
  display: flex; align-items: center;
  padding: 120px 5vw 80px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.028) 1px, transparent 1px);
  background-size: 90px 90px;
  mask-image: radial-gradient(800px 500px at 30% 40%, #000 30%, transparent 75%);
  pointer-events: none;
}
.hero-grid {
  position: relative; z-index: 2;
  max-width: var(--maxw-wide); width: 100%; margin: 0 auto;
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 60px; align-items: center;
}
.hero-kicker {
  font-family: var(--mono); font-size: 13px; letter-spacing: .42em;
  color: var(--orange-soft); margin-bottom: 26px;
}
.hero-name .cn {
  display: block; font-family: var(--serif); font-weight: 700;
  font-size: clamp(52px, 7.2vw, 96px); line-height: 1.08; letter-spacing: .06em;
}
.hero-name .en {
  display: block; font-family: var(--serif); font-weight: 600;
  font-size: clamp(26px, 3.4vw, 44px); color: rgba(255,255,255,.82);
  margin-top: 10px; letter-spacing: .18em;
}
.hero-role {
  margin-top: 30px; font-size: clamp(16px, 1.6vw, 19px); color: #fff;
  letter-spacing: .1em; font-weight: 500;
}
.hero-desc {
  margin-top: 16px; max-width: 560px; color: rgba(255,255,255,.66);
  font-size: 15.5px; line-height: 2;
}
.hero-cta { margin-top: 38px; display: flex; gap: 16px; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 13px 30px; text-decoration: none;
  font-size: 15px; letter-spacing: .08em; border-radius: 2px;
  transition: all .3s; border: 1px solid transparent;
}
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--orange-deep); transform: translateY(-2px); box-shadow: 0 12px 28px rgba(232,98,44,.35); }
.btn-ghost { border-color: rgba(255,255,255,.35); color: #fff; }
.btn-ghost:hover { border-color: #fff; background: rgba(255,255,255,.08); }

.hero-art {
  position: relative; text-align: right;
}
.hero-art img {
  width: min(440px, 100%); margin-left: auto;
  border-radius: 2px;
  box-shadow: 0 40px 90px rgba(0,0,0,.45);
  filter: saturate(1.05);
}
.hero-art-caption {
  position: absolute; bottom: -26px; left: 0;
  font-family: var(--mono); font-size: 11px; letter-spacing: .3em; color: rgba(255,255,255,.5);
}

.hero-scrollhint {
  position: absolute; bottom: 34px; left: 5vw; z-index: 2;
  display: flex; align-items: center; gap: 14px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .4em; color: rgba(255,255,255,.55);
}
.hero-scrollhint .line { width: 60px; height: 1px; background: rgba(255,255,255,.4); position: relative; overflow: hidden; }
.hero-scrollhint .line::after {
  content: ""; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
  background: var(--orange); animation: slide 2.4s ease-in-out infinite;
}
@keyframes slide { 0% {left:-100%} 55% {left:100%} 100% {left:100%} }

/* ---------- 通用 Section ---------- */
.section { max-width: var(--maxw); margin: 0 auto; padding: 130px 5vw; }

.section-head { display: flex; align-items: baseline; gap: 22px; margin-bottom: 56px; }
.section-index {
  font-family: var(--mono); font-size: 14px; color: var(--orange);
  letter-spacing: .2em; border: 1.5px solid var(--orange);
  padding: 3px 12px; border-radius: 2px; transform: translateY(-6px);
}
.section-title {
  font-family: var(--serif); font-size: clamp(30px, 4vw, 44px); font-weight: 700;
  letter-spacing: .06em;
}
.section-title em {
  font-style: normal; font-family: var(--mono); font-size: 15px; font-weight: 400;
  color: var(--ink-soft); letter-spacing: .28em; margin-left: 14px;
}

/* ---------- About ---------- */
.about { background: var(--paper); }
.about-grid {
  display: grid; grid-template-columns: 1.4fr .6fr; gap: 70px; align-items: start;
}
.about-statement {
  font-family: var(--serif); font-size: clamp(18px, 2vw, 24px); line-height: 2.05;
  color: var(--ink);
}
.about-statement strong { color: var(--orange-deep); font-weight: 700; }
.about-facts { border-top: 2px solid var(--ink); padding-top: 18px; }
.fact { display: flex; gap: 18px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.fact-key { font-family: var(--mono); color: var(--ink-soft); letter-spacing: .1em; flex-shrink: 0; width: 44px; }
.fact-val { font-weight: 500; }

/* ---------- Experience ---------- */
.experience { background: var(--ivory); }
.exp-block { margin-bottom: 62px; }
.exp-block:last-child { margin-bottom: 0; }
.exp-cat {
  display: flex; align-items: center; gap: 16px;
  font-family: var(--serif); font-size: 20px; font-weight: 700;
  margin-bottom: 20px; letter-spacing: .04em;
}
.exp-cat span {
  font-family: var(--mono); font-size: 11.5px; font-weight: 400;
  letter-spacing: .3em; color: var(--orange);
  border: 1px solid rgba(232,98,44,.45); padding: 3px 10px; border-radius: 2px;
}
.exp-item {
  display: grid; grid-template-columns: 210px 1fr; gap: 30px;
  padding: 24px 0; border-bottom: 1px solid var(--line);
}
.exp-item:last-child { border-bottom: 0; }
.exp-when {
  font-family: var(--mono); font-size: 13.5px; color: var(--ink-soft);
  letter-spacing: .06em; line-height: 1.9; padding-top: 3px;
}
.exp-title { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.exp-title .tag {
  font-style: normal; font-family: var(--mono); font-size: 11.5px; font-weight: 400;
  color: var(--orange-deep); background: rgba(232,98,44,.1);
  padding: 3px 10px; border-radius: 2px; margin-left: 8px; letter-spacing: .06em;
}
.exp-note { font-size: 14.5px; color: var(--ink-soft); line-height: 2; }
.note-small { font-size: 13px; color: #8a8f98; }
.link { color: var(--orange-deep); text-decoration: none; border-bottom: 1px solid rgba(201,78,30,.4); }
.link:hover { border-bottom-color: var(--orange-deep); }

/* ---------- Works ---------- */
.works { background: var(--paper); max-width: var(--maxw-wide); }
.works-intro { color: var(--ink-soft); font-size: 16.5px; margin: -32px 0 30px; }

.work { padding: 96px 0 40px; }
.work-head {
  display: grid; grid-template-columns: 74px 1fr auto; gap: 26px; align-items: baseline;
  border-top: 2px solid var(--ink); padding-top: 30px; margin-bottom: 44px;
}
.work-num { font-family: var(--mono); font-size: 26px; color: var(--orange); font-weight: 600; }
.work-title { font-family: var(--serif); font-size: clamp(28px, 3.6vw, 42px); font-weight: 700; letter-spacing: .03em; }
.work-sub { font-family: var(--mono); font-size: 13px; letter-spacing: .22em; color: var(--ink-soft); margin-top: 8px; }
.work-meta { text-align: right; font-size: 13px; color: var(--ink-soft); line-height: 2.1; font-family: var(--mono); letter-spacing: .04em; }

.work-desc {
  max-width: 760px; margin-bottom: 44px; color: var(--ink);
  font-size: 15.5px; line-height: 2.1;
}
.work-desc p + p { margin-top: 14px; }
.work-desc b { color: var(--orange-deep); font-weight: 600; }

.work-figure { margin: 0 0 44px; }
.work-figure img {
  width: 100%; border-radius: 3px;
  box-shadow: 0 22px 55px rgba(14,27,44,.16);
  transition: transform .6s cubic-bezier(.2,.6,.2,1), box-shadow .6s;
  background: #fff;
}
.work-figure img:hover { transform: scale(1.006); box-shadow: 0 30px 70px rgba(14,27,44,.22); }
.work-figure figcaption {
  margin-top: 14px; font-size: 13px; color: var(--ink-soft);
  letter-spacing: .05em; padding-left: 14px; position: relative;
}
.work-figure figcaption::before {
  content: ""; position: absolute; left: 0; top: 7px; width: 6px; height: 6px;
  background: var(--orange); border-radius: 50%;
}

/* ---------- Handmade ---------- */
.handmade { background: var(--ivory); }
.handmade .work-figure { margin-bottom: 0; }

/* ---------- Contact ---------- */
.contact {
  background:
    radial-gradient(900px 500px at 85% 0%, rgba(232,98,44,.14), transparent 55%),
    linear-gradient(160deg, #0A1420, var(--navy) 60%, var(--navy-2));
  color: #fff; padding: 150px 5vw 70px; text-align: center; position: relative; overflow: hidden;
}
.contact::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 100% 90px;
  pointer-events: none;
}
.contact-inner { position: relative; z-index: 2; max-width: 900px; margin: 0 auto; }
.contact-kicker { font-family: var(--mono); font-size: 13px; letter-spacing: .44em; color: var(--orange-soft); }
.contact-title {
  font-family: var(--serif); font-size: clamp(34px, 5.4vw, 62px); font-weight: 700;
  line-height: 1.35; margin: 26px 0 40px; letter-spacing: .05em;
}
.contact-mail {
  font-family: var(--mono); font-size: clamp(17px, 2.4vw, 24px); color: #fff;
  text-decoration: none; border-bottom: 2px solid var(--orange);
  padding-bottom: 6px; letter-spacing: .05em; transition: all .3s;
}
.contact-mail:hover { color: var(--orange-soft); border-color: var(--orange-soft); }
.contact-note { margin-top: 90px; color: rgba(255,255,255,.45); font-size: 13px; letter-spacing: .14em; }
.back-top {
  display: inline-block; margin-top: 26px; color: rgba(255,255,255,.7);
  text-decoration: none; font-size: 13.5px; letter-spacing: .12em; transition: color .3s;
}
.back-top:hover { color: var(--orange-soft); }

/* 回到顶部按钮 */
.to-top {
  position: fixed; right: 28px; bottom: 28px; z-index: 150;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--navy); color: #fff; border: 1px solid rgba(255,255,255,.14);
  font-size: 18px; cursor: pointer; opacity: 0; pointer-events: none;
  transform: translateY(12px); transition: all .35s;
}
.to-top.show { opacity: 1; pointer-events: auto; transform: translateY(0); }
.to-top:hover { background: var(--orange); border-color: var(--orange); }

/* ---------- 入场动画 ---------- */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.6,.2,1); }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 50px; }
  .hero-art img { width: min(400px, 100%); margin: 0 auto; }
  .hero-art-caption { position: static; margin-top: 14px; text-align: center; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .work-head { grid-template-columns: 54px 1fr; }
  .work-meta { grid-column: 1 / -1; text-align: left; }
  .exp-item { grid-template-columns: 1fr; gap: 10px; }
}

@media (max-width: 720px) {
  .nav-links {
    position: fixed; top: 0; right: 0; height: 100vh; width: min(280px, 78vw);
    background: var(--navy); flex-direction: column; justify-content: center;
    gap: 30px; padding: 40px; transform: translateX(100%);
    transition: transform .4s cubic-bezier(.2,.6,.2,1);
    box-shadow: -20px 0 60px rgba(0,0,0,.4);
  }
  .nav-links.open { transform: translateX(0); }
  .nav-toggle { display: block; position: relative; z-index: 110; }
  .section { padding: 90px 6vw; }
  .work { padding: 70px 0 20px; }
  .contact { padding: 110px 6vw 60px; }
  .hero-scrollhint { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-scrollhint .line::after, * { animation: none !important; }
}
