/* =========================================================
   杨云帆 · 个人主页
   Design tokens / Layout / Components
   ========================================================= */

:root {
  --bg: #f6f4ee;
  --bg-alt: #efece3;
  --surface: #fffdf8;
  --ink: #14130f;
  --ink-2: #3c3932;
  --muted: #7b7568;
  --line: rgba(20, 19, 15, 0.13);
  --line-soft: rgba(20, 19, 15, 0.07);
  --accent: #b4472a;
  --accent-deep: #94381f;
  --accent-solid: #b4472a;
  --accent-solid-hover: #94381f;
  --accent-soft: #f2e3da;
  --gold: #b5893f;
  --contact-bg: #131210;
  --contact-ink: #f4f1e8;

  --sans: "Inter", "HarmonyOS Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --mono: "SFMono-Regular", "JetBrains Mono", "Cascadia Mono", Consolas, "Liberation Mono", monospace;

  --wrap: 1180px;
  --pad: clamp(20px, 4vw, 40px);
  --radius: 18px;
  --ease: cubic-bezier(0.22, 0.72, 0.24, 1);
}

[data-theme="dark"] {
  --bg: #0d0e10;
  --bg-alt: #121316;
  --surface: #16181b;
  --ink: #f2efe7;
  --ink-2: #cfcabf;
  --muted: #96918a;
  --line: rgba(242, 239, 231, 0.14);
  --line-soft: rgba(242, 239, 231, 0.07);
  --accent: #e6a07c;
  --accent-deep: #f0b697;
  --accent-solid: #b4472a;
  --accent-solid-hover: #c4552f;
  --accent-soft: #33201a;
  --gold: #d8ad68;
  --contact-bg: #07080a;
  --contact-ink: #f4f1e8;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  -webkit-tap-highlight-color: transparent;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
}

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

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: -999px;
  top: 12px;
  z-index: 200;
  background: var(--ink);
  color: var(--bg);
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
}
.skip:focus { left: 16px; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--pad);
  position: relative;
}

.ico { width: 1em; height: 1em; flex: none; }
.mono { font-family: var(--mono); }

/* ---------- grain + progress ---------- */
.grain {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0.032;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}
[data-theme="dark"] .grain { mix-blend-mode: screen; opacity: 0.05; }

.progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  z-index: 90;
  background: transparent;
}
.progress span {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.08s linear;
}

/* ---------- nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 70;
  border-bottom: 1px solid transparent;
  transition: background-color 0.35s var(--ease), border-color 0.35s var(--ease), backdrop-filter 0.35s;
}
.nav.scrolled {
  background: rgba(246, 244, 238, 0.82);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom-color: var(--line-soft);
}
[data-theme="dark"] .nav.scrolled { background: rgba(13, 14, 16, 0.82); }

.nav-inner {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: var(--ink);
  color: var(--bg);
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  transition: transform 0.35s var(--ease), background-color 0.3s;
}
.brand:hover .brand-mark { transform: rotate(-6deg); }
.brand-text {
  display: flex;
  flex-direction: column;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.01em;
}
.brand-text small {
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a {
  position: relative;
  font-size: 13.5px;
  color: var(--ink-2);
  padding: 4px 0;
  transition: color 0.25s;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1.5px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after,
.nav-links a.active::after { transform: scaleX(1); }
.nav-links a.active { color: var(--ink); }

.nav-tools { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  width: 36px; height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  transition: background-color 0.25s, color 0.25s, border-color 0.25s;
}
.icon-btn .ico { width: 17px; height: 17px; }
.icon-btn:hover { background: var(--bg-alt); color: var(--ink); border-color: var(--line-soft); }
.ico-moon { display: none; }
[data-theme="dark"] .ico-sun { display: none; }
[data-theme="dark"] .ico-moon { display: block; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 20px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.3s var(--ease), background-color 0.25s, border-color 0.25s, color 0.25s, box-shadow 0.3s;
}
.btn .ico { width: 15px; height: 15px; transition: transform 0.3s var(--ease); }
.btn--mini {
  height: 34px;
  padding: 0 14px;
  font-size: 12.5px;
  border-color: var(--line);
  border-radius: 7px;
}
.btn--mini:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn--primary {
  background: var(--accent-solid);
  color: #fff;
  box-shadow: 0 12px 28px -14px rgba(180, 71, 42, 0.75);
}
.btn--primary:hover {
  background: var(--accent-solid-hover);
  transform: translateY(-2px);
  box-shadow: 0 18px 34px -16px rgba(180, 71, 42, 0.8);
}
.btn--primary:hover .ico { transform: translate(2px, -2px); }
.btn--ghost { border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); transform: translateY(-2px); }
.btn--ghost:hover .ico { transform: translateY(2px); }
.btn--light { background: var(--contact-ink); color: #14130f; }
.btn--light:hover { transform: translateY(-2px); background: #fff; }
.btn--outline-light { border-color: rgba(244, 241, 232, 0.24); color: var(--contact-ink); }
.btn--outline-light:hover { border-color: rgba(244, 241, 232, 0.6); background: rgba(255, 255, 255, 0.06); }

.menu-btn {
  display: none;
  width: 38px; height: 38px;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  padding: 0;
  place-items: center;
  align-content: center;
  gap: 5px;
}
.menu-btn span {
  display: block;
  width: 15px; height: 1.5px;
  background: var(--ink);
  transition: transform 0.3s var(--ease), opacity 0.2s;
}
.menu-btn[aria-expanded="true"] span:first-child { transform: translateY(3.2px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-3.2px) rotate(-45deg); }

/* ---------- mobile menu ---------- */
.mobile-menu[hidden] { display: none; }
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 65;
  background: var(--bg);
  padding: 100px var(--pad) 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), visibility 0.35s;
}
.mobile-menu.is-open { opacity: 1; visibility: visible; transform: none; }
.mobile-menu nav { display: flex; flex-direction: column; }
.mobile-menu nav a {
  display: flex;
  align-items: baseline;
  gap: 16px;
  font-size: clamp(26px, 8vw, 34px);
  font-weight: 500;
  letter-spacing: -0.02em;
  padding: 16px 0;
  border-bottom: 1px solid var(--line-soft);
}
.mobile-menu nav a i {
  font-family: var(--mono);
  font-style: normal;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.1em;
}
.mobile-menu-foot {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 128px 0 96px;
  overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-glow {
  position: absolute;
  width: min(760px, 80vw);
  aspect-ratio: 1;
  right: -8%;
  top: -14%;
  background: radial-gradient(circle, rgba(180, 71, 42, 0.16), rgba(180, 71, 42, 0) 62%);
}
[data-theme="dark"] .hero-glow { background: radial-gradient(circle, rgba(230, 160, 124, 0.16), rgba(230, 160, 124, 0) 62%); }
.hero-lines {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: calc(100% / 6) 100%;
  mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 74%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 74%, transparent);
  opacity: 0.9;
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0;
}
.dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

.hero-title {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 22px 0 0;
  font-weight: 600;
}
.hero-title .cn {
  font-size: clamp(64px, 8.4vw, 112px);
  line-height: 0.94;
  letter-spacing: -0.05em;
}
.hero-title .en {
  font-family: var(--mono);
  font-size: clamp(10px, 1vw, 12px);
  font-weight: 500;
  letter-spacing: 0.44em;
  color: var(--muted);
}

.hero-tagline {
  position: relative;
  margin: 26px 0 0;
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.4;
}
.hero-tagline em {
  position: relative;
  font-style: normal;
  color: var(--accent);
  display: inline-block;
}
.swoosh {
  position: absolute;
  left: -2%;
  bottom: -0.22em;
  width: 104%;
  height: 0.26em;
  color: var(--accent);
  opacity: 0.55;
  overflow: visible;
}

.hero-desc {
  max-width: 44ch;
  margin: 22px 0 0;
  font-size: 15.5px;
  line-height: 1.9;
  color: var(--ink-2);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  list-style: none;
  margin: 38px 0 0;
  padding: 18px 0 0;
  border-top: 1px solid var(--line-soft);
  font-size: 12px;
  color: var(--muted);
}
.hero-meta li { display: flex; align-items: center; gap: 8px; }
.hero-meta a { border-bottom: 1px solid transparent; transition: color 0.2s, border-color 0.2s; }
.hero-meta a:hover { color: var(--ink); border-bottom-color: var(--ink); }
.meta-k {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.16em;
  color: var(--muted);
  opacity: 0.75;
}

/* polaroid */
.hero-side { display: flex; justify-content: flex-end; padding-right: 6px; }
.polaroid {
  position: relative;
  margin: 0;
  width: 100%;
  max-width: 392px;
  padding: 13px 13px 0;
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 3px;
  box-shadow: 0 36px 70px -36px rgba(20, 19, 15, 0.55), 0 2px 6px rgba(20, 19, 15, 0.05);
  transform: rotate(-1.6deg);
  transition: transform 0.7s var(--ease), box-shadow 0.7s var(--ease);
}
[data-theme="dark"] .polaroid { background: #1c1a16; }
.polaroid:hover { transform: rotate(-0.6deg) translateY(-5px); box-shadow: 0 44px 80px -36px rgba(20, 19, 15, 0.6); }
.polaroid-img {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--bg-alt);
}
.polaroid-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 30%;
  transition: transform 1.4s var(--ease);
}
.polaroid:hover .polaroid-img img { transform: scale(1.03); }
.polaroid figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  height: 50px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.polaroid-tag {
  font-size: 8.5px;
  letter-spacing: 0.16em;
  color: var(--accent);
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 3px 8px;
  opacity: 0.75;
}
.tape {
  position: absolute;
  top: -13px;
  left: 50%;
  width: 92px;
  height: 24px;
  transform: translateX(-50%) rotate(-3deg);
  background: rgba(214, 196, 160, 0.45);
  border-left: 1px dashed rgba(255, 255, 255, 0.4);
  border-right: 1px dashed rgba(255, 255, 255, 0.4);
  box-shadow: 0 2px 6px rgba(20, 19, 15, 0.08);
  z-index: 2;
}
[data-theme="dark"] .tape { background: rgba(190, 168, 124, 0.26); }

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.24em;
  color: var(--muted);
  z-index: 3;
}
.scroll-line {
  display: block;
  width: 1px; height: 30px;
  background: var(--line);
  overflow: hidden;
}
.scroll-line i {
  display: block;
  width: 100%; height: 50%;
  background: var(--ink);
  animation: scrollDown 2.2s var(--ease) infinite;
}
@keyframes scrollDown {
  0% { transform: translateY(-110%); }
  60%, 100% { transform: translateY(220%); }
}

/* ---------- marquee ---------- */
.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
  overflow: hidden;
  background: var(--bg);
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 34s linear infinite;
}
.marquee-set {
  display: flex;
  align-items: center;
  gap: 34px;
  padding-right: 34px;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--muted);
  white-space: nowrap;
}
.marquee-track b { color: var(--accent); font-size: 9px; }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- now ---------- */
.now { padding: 34px 0 4px; }
.now-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.now-item { padding: 4px 24px; border-left: 1px solid var(--line-soft); }
.now-item:first-child { border-left: 0; padding-left: 0; }
.now-k {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.14em;
  color: var(--accent);
}
.now-item p {
  margin: 7px 0 0;
  font-size: 14.5px;
  letter-spacing: -0.01em;
  color: var(--ink-2);
}

/* ---------- section shell ---------- */
.section {
  padding: clamp(80px, 10vw, 132px) 0;
  scroll-margin-top: 80px;
}
.section--alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.section--work { padding-top: clamp(70px, 8vw, 110px); }

.sec-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  margin-bottom: 44px;
}
.sec-index {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--accent);
}
.sec-head h2 {
  margin: 0;
  font-size: clamp(28px, 3.4vw, 42px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.2;
}
.sec-en {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.3em;
  color: var(--muted);
}
.sec-intro {
  max-width: 46ch;
  margin: -20px 0 40px;
  font-size: 15px;
  line-height: 1.9;
  color: var(--muted);
}

/* ---------- about ---------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
  gap: clamp(36px, 6vw, 80px);
  align-items: start;
}
.about-copy p { margin: 0 0 18px; font-size: 15.5px; line-height: 2; color: var(--ink-2); }
.about-copy .lead {
  margin-bottom: 26px;
  font-size: clamp(23px, 2.5vw, 31px);
  line-height: 1.55;
  letter-spacing: -0.025em;
  color: var(--ink);
  font-weight: 500;
}
.link {
  color: var(--ink);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 1px;
  transition: color 0.2s, background-color 0.2s;
}
.link:hover { color: var(--accent); }
.sign {
  font-family: var(--mono);
  font-size: 11.5px !important;
  color: var(--muted) !important;
  letter-spacing: 0.02em;
  margin-top: 24px !important;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.edu { padding: 24px 26px 22px; }
.edu-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.edu-head h3 { margin: 0; font-size: 19px; font-weight: 600; letter-spacing: -0.02em; }
.badges { display: flex; gap: 5px; }
.badges span {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 4px;
  padding: 3px 6px;
}
.edu-major { margin: 4px 0 18px; font-size: 13px; color: var(--muted); }
.edu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 18px;
  margin: 0 0 18px;
  padding: 16px 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.edu-grid dt {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 3px;
}
.edu-grid dd {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.edu-grid dd small { font-size: 10px; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.edu-courses { margin: 0; font-size: 12px; line-height: 1.8; color: var(--muted); }
.edu-courses span {
  display: inline-block;
  margin-right: 8px;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.14em;
  color: var(--accent);
}

.file {
  padding: 22px 24px 20px;
  position: sticky;
  top: 100px;
}
.file-top {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line-soft);
}
.file-avatar {
  width: 62px;
  height: 78px;
  flex: none;
  border-radius: 5px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--accent-soft);
}
.file-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: center 18%; }
.file-name { margin: 0; font-size: 19px; font-weight: 600; letter-spacing: -0.02em; }
.file-en { margin: 3px 0 0; font-family: var(--mono); font-size: 8px; letter-spacing: 0.22em; color: var(--muted); }
.file-school {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
}
.file-school h3 { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -0.02em; }
.file-note {
  margin: 16px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  font-size: 11.5px;
  line-height: 1.8;
  color: var(--muted);
}

.life-band {
  margin: 56px 0 0;
  position: relative;
}
.life-band-img {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: var(--bg-alt);
  aspect-ratio: 1920 / 803;
}
.life-band-img::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
  pointer-events: none;
}
.life-band-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 46%;
  transition: transform 1.6s var(--ease);
}
.life-band:hover .life-band-img img { transform: scale(1.025); }
.life-band figcaption {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.life-band figcaption span:last-child { color: var(--ink-2); letter-spacing: 0.04em; }

/* ---------- projects ---------- */
.proj {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  transition: border-color 0.35s, box-shadow 0.45s var(--ease), transform 0.45s var(--ease);
}
.proj:hover { border-color: rgba(180, 71, 42, 0.3); box-shadow: 0 30px 60px -40px rgba(20, 19, 15, 0.4); }

.proj--feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  gap: clamp(24px, 3.6vw, 52px);
  align-items: center;
  padding: clamp(22px, 3vw, 38px);
}
.proj--feature + .proj--feature { margin-top: 24px; }
.proj--reverse .proj-media { order: -1; }

.proj-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-bottom: 14px;
}
.tag {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 9px;
  text-transform: uppercase;
}
.proj-role {
  margin-left: auto;
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--accent);
}
.proj-stars {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--gold);
  letter-spacing: 0.04em;
}
.proj-title {
  margin: 0;
  font-size: clamp(27px, 3.2vw, 38px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.15;
}
.proj-sub {
  margin: 6px 0 14px;
  font-size: 12.5px;
  color: var(--muted);
  letter-spacing: 0.01em;
}
.proj-desc {
  margin: 0 0 14px;
  font-size: 14.5px;
  line-height: 1.9;
  color: var(--ink-2);
}
.proj-points {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
}
.proj-points li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 7px;
  font-size: 13px;
  line-height: 1.75;
  color: var(--muted);
}
.proj-points li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.72em;
  width: 7px; height: 1px;
  background: var(--accent);
  opacity: 0.7;
}
.proj-tech { display: flex; flex-wrap: wrap; gap: 6px; }
.proj-tech span {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  background: var(--bg-alt);
  border-radius: 4px;
  padding: 4px 7px;
}
[data-theme="dark"] .proj-tech span { background: rgba(255, 255, 255, 0.05); }
.proj-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  font-size: 12.5px;
  font-weight: 500;
  padding-bottom: 3px;
  border-bottom: 1px solid var(--line);
  transition: border-color 0.25s, color 0.25s;
}
.proj-link:hover { color: var(--accent); border-bottom-color: var(--accent); }
.proj-link .ico { transition: transform 0.3s var(--ease); }
.proj-link:hover .ico { transform: translate(2px, -2px); }

.window {
  border-radius: 10px;
  overflow: hidden;
  background: #0e1116;
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 34px 70px -40px rgba(0, 0, 0, 0.65);
  transition: transform 0.5s var(--ease);
}
.proj:hover .window { transform: translateY(-4px); }
.window-bar {
  height: 32px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  background: #171b21;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.wd { width: 7px; height: 7px; border-radius: 50%; background: #39424d; }
.window-title {
  margin-left: 10px;
  font-family: var(--mono);
  font-size: 9.5px;
  color: #7b8794;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.window img { width: 100%; height: auto; }
.window--light { background: #f2f1ec; border-color: rgba(20, 19, 15, 0.1); }
.window--light .window-bar { background: #e9e7df; border-bottom-color: rgba(20, 19, 15, 0.07); }
.window--light .wd { background: #cfcabd; }
.window--light .window-title { color: #8b867a; }

/* duo cards */
.proj-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 24px;
  align-items: stretch;
}
.proj--card { display: flex; flex-direction: column; overflow: hidden; }
.proj--card .proj-body { padding: 26px 26px 28px; display: flex; flex-direction: column; flex: 1; }
.proj--card .proj-tech { margin-top: auto; padding-top: 4px; }
.proj--card .proj-kicker { margin-bottom: 12px; }

.proj-visual {
  position: relative;
  height: 344px;
  overflow: hidden;
  background: #0e1116;
}
.proj-visual svg { display: block; width: 100%; height: auto; }
.visual-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  color: #7c8796;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.visual-head span:nth-child(2) { flex: 1; }
.live { display: inline-flex; align-items: center; gap: 5px; color: #7ee0ad; }
.live i {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #4fd68f;
  animation: pulse 2.4s infinite;
}
.barrier { animation: barrier 6s var(--ease) infinite alternate; transform-origin: center; }
@keyframes barrier {
  0%, 20% { transform: translateY(-6px); }
  55%, 100% { transform: translateY(10px); }
}
.visual-foot {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 18px;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.08em;
  color: #6f7b89;
  background: linear-gradient(to top, rgba(14, 17, 22, 0.96), rgba(14, 17, 22, 0));
}

.visual-ai { background: #ece8dd; }
.visual-head--light { color: #8b8678; border-bottom-color: rgba(20, 19, 15, 0.08); }
.visual-ai::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(20, 19, 15, 0.13) 1px, transparent 1px);
  background-size: 16px 16px;
  opacity: 0.5;
}
.phone {
  position: relative;
  width: 166px;
  margin: 12px auto 0;
  border-radius: 26px;
  border: 5px solid #17191c;
  background: #17191c;
  overflow: hidden;
  box-shadow: 0 26px 50px -24px rgba(20, 19, 15, 0.5);
  z-index: 1;
}
.phone-notch {
  position: absolute;
  top: 6px; left: 50%;
  transform: translateX(-50%);
  width: 46px; height: 4px;
  border-radius: 3px;
  background: #17191c;
  z-index: 2;
}
.phone-screen { border-radius: 21px; overflow: hidden; background: #fbfaf6; }
.phone-screen svg { display: block; width: 100%; height: auto; }
.phone-slider {
  margin: 0 14px;
  height: 3px;
  border-radius: 2px;
  background: #e2dccc;
  position: relative;
}
.phone-slider span {
  position: absolute;
  left: 0; top: 0;
  height: 100%;
  width: 62%;
  border-radius: 2px;
  background: var(--accent);
}
.phone-hint {
  padding: 7px 0 10px;
  text-align: center;
  font-size: 8.5px;
  letter-spacing: 0.04em;
  color: #8a8578;
}
.float-label {
  position: absolute;
  z-index: 2;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.04em;
  background: #fffdf8;
  border: 1px solid rgba(20, 19, 15, 0.12);
  border-radius: 5px;
  padding: 4px 7px;
  color: #3c3932;
  box-shadow: 0 8px 18px -10px rgba(20, 19, 15, 0.4);
}
.float-label--a { left: 26px; top: 104px; }
.float-label--b { right: 22px; top: 208px; }
.visual-foot--light { color: #8b8678; background: linear-gradient(to top, rgba(236, 232, 221, 0.98), rgba(236, 232, 221, 0)); }

/* more repos */
.more-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: 56px 0 8px;
}
.more-head h3 { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.more-head .link { font-size: 12px; }
.repo-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 32px;
}
.repo-list li { border-bottom: 1px solid var(--line-soft); }
.repo-list a {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  align-items: baseline;
  gap: 12px;
  padding: 15px 6px;
  transition: background-color 0.25s, padding-left 0.25s;
}
.repo-list a:hover { background: var(--surface); padding-left: 12px; }
.repo-name { font-family: var(--mono); font-size: 12px; letter-spacing: -0.01em; color: var(--ink); }
.repo-desc {
  font-size: 11.5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.repo-star { font-family: var(--mono); font-size: 10px; color: var(--gold); }

/* ---------- skills ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
.skill {
  background: var(--surface);
  padding: 30px 30px 28px;
  position: relative;
  transition: background-color 0.35s;
}
.skill:hover { background: var(--bg); }
.skill-no {
  position: absolute;
  top: 30px; right: 30px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--muted);
  opacity: 0.7;
}
.skill h3 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: 0.01em; color: var(--muted); }
.skill-main {
  margin: 10px 0 10px;
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 600;
  letter-spacing: -0.03em;
}
.skill-note { margin: 0 0 16px; font-size: 12.5px; line-height: 1.85; color: var(--muted); max-width: 40ch; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.skill-tags span {
  font-size: 11px;
  color: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
}
.skills-learning {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 22px 0 0;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

/* ---------- awards ---------- */
.awards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 40px);
}
.award-col { border-top: 2px solid var(--ink); padding-top: 14px; }
.award-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 4px;
}
.award-head span { font-size: 12.5px; font-weight: 600; letter-spacing: 0.02em; }
.award-head em {
  font-style: normal;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
}
.award-col ul { list-style: none; margin: 0; padding: 0; }
.award-col li {
  padding: 13px 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
  border-bottom: 1px dashed var(--line);
  transition: color 0.25s, padding-left 0.25s;
}
.award-col li:hover { color: var(--ink); padding-left: 4px; }
.award-col li b { color: var(--ink); font-weight: 600; }

.creds {
  margin-top: 52px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.cred { background: var(--surface); padding: 16px 20px; display: flex; flex-direction: column; gap: 3px; }
.cred-k {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.18em;
  color: var(--accent);
  opacity: 0.85;
}
.cred b { font-size: 13.5px; font-weight: 500; letter-spacing: -0.01em; }

/* ---------- timeline ---------- */
.timeline { border-bottom: 1px solid var(--line); }
.tl-item {
  display: grid;
  grid-template-columns: 116px 1fr;
  gap: clamp(20px, 4vw, 48px);
  padding: 24px 0;
  border-top: 1px solid var(--line);
}
.tl-when {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding-top: 4px;
}
.tl-body { position: relative; padding-left: 26px; }
.tl-body::before {
  content: "";
  position: absolute;
  left: 0; top: 8px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.tl-body::after {
  content: "";
  position: absolute;
  left: 3px; top: 26px; bottom: -30px;
  width: 1px;
  background: var(--line);
}
.tl-item:last-child .tl-body::after { display: none; }
.tl-body h3 { margin: 0 0 5px; font-size: 18px; font-weight: 600; letter-spacing: -0.02em; }
.tl-body p { margin: 0; font-size: 13.5px; line-height: 1.85; color: var(--muted); max-width: 62ch; }

/* ---------- contact ---------- */
.contact {
  position: relative;
  background: var(--contact-bg);
  color: var(--contact-ink);
  padding: clamp(88px, 11vw, 150px) 0 36px;
  overflow: hidden;
}
.contact::before {
  content: "";
  position: absolute;
  width: 700px; height: 700px;
  right: -160px; top: -260px;
  background: radial-gradient(circle, rgba(180, 71, 42, 0.45), transparent 62%);
  filter: blur(20px);
  pointer-events: none;
}
.contact .eyebrow { color: rgba(244, 241, 232, 0.55); }
.contact .dot { background: #e8a882; }
.contact-inner { position: relative; z-index: 2; }
.contact-title {
  margin: 26px 0 0;
  font-size: clamp(44px, 7.6vw, 96px);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.045em;
}
.contact-title em { font-style: normal; color: #e8a882; }
.contact-desc {
  max-width: 42ch;
  margin: 26px 0 0;
  font-size: 15px;
  line-height: 1.9;
  color: rgba(244, 241, 232, 0.62);
}
.contact-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 40px; }
.contact-watermark {
  position: absolute;
  right: -2%;
  bottom: -4%;
  font-size: clamp(120px, 26vw, 380px);
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 0.8;
  color: rgba(244, 241, 232, 0.024);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}
.contact-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: clamp(64px, 9vw, 110px);
  padding-top: 22px;
  border-top: 1px solid rgba(244, 241, 232, 0.14);
  font-size: 11.5px;
  color: rgba(244, 241, 232, 0.45);
}
.cb-left { display: flex; align-items: center; gap: 10px; }
.cb-left p { margin: 0; }
.brand-mark--light { background: rgba(244, 241, 232, 0.1); color: var(--contact-ink); width: 28px; height: 28px; font-size: 13px; }
.cb-mid { font-family: var(--mono); font-size: 10px; letter-spacing: 0.06em; }
.cb-top { transition: color 0.25s; }
.cb-top:hover { color: var(--contact-ink); }

/* ---------- toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 16px);
  background: var(--ink);
  color: var(--bg);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 12.5px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s var(--ease);
  z-index: 120;
  box-shadow: 0 16px 40px -18px rgba(0, 0, 0, 0.6);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.85s var(--ease), transform 0.85s var(--ease);
  transition-delay: var(--d, 0ms);
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: none; }
html.no-js .reveal { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .nav-links { gap: 22px; }
  .hero-title .cn { font-size: clamp(58px, 8.6vw, 96px); }
  .repo-list { grid-template-columns: 1fr; }
}

@media (max-width: 920px) {
  .nav-links { display: none; }
  .menu-btn { display: grid; }
  .nav-tools .icon-btn { display: none; }
  .nav-tools .icon-btn#themeBtn { display: grid; }
  .btn--mini { display: none; }

  .now-grid { grid-template-columns: 1fr 1fr; gap: 22px 0; }
  .now-item { padding: 4px 20px; }
  .now-item:nth-child(3) { border-left: 0; padding-left: 0; }
  .now-item:nth-child(odd) { padding-left: 0; }

  .about-grid { grid-template-columns: 1fr; }
  .file { position: static; max-width: 460px; }
  .life-band { margin-top: 40px; }

  .proj--feature { grid-template-columns: 1fr; gap: 26px; }
  .proj--feature .proj-media { order: -1; }
  .proj--reverse .proj-media { order: -1; }
  .proj-duo { grid-template-columns: 1fr; }
  .proj-visual { height: auto; }
  .visual-foot { position: static; background: none; }

  .awards-grid { grid-template-columns: 1fr; gap: 32px; }
  .creds { grid-template-columns: 1fr 1fr; }
  .skills-grid { grid-template-columns: 1fr; }

  .contact-bottom { flex-wrap: wrap; }
  .cb-mid { order: 3; width: 100%; }
}

@media (max-width: 780px) {
  .hero { min-height: auto; padding: 110px 0 72px; }
  .hero-inner { grid-template-columns: 1fr; gap: 34px; }
  .hero-side { order: -1; justify-content: flex-start; padding-right: 0; }
  .polaroid { max-width: 300px; }
  .scroll-hint { display: none; }
}

@media (max-width: 600px) {
  .hero { padding-top: 90px; }
  .hero-title .cn { font-size: clamp(54px, 17vw, 72px); }
  .hero-tagline { font-size: 22px; }
  .hero-actions .btn { flex: 0 1 auto; height: 46px; padding: 0 16px; font-size: 13px; }
  .hero-meta { gap: 8px 16px; font-size: 11px; }
  .hero-side { justify-content: center; }
  .polaroid { max-width: 224px; }
  .polaroid figcaption { height: 44px; font-size: 8.5px; }
  .tape { width: 82px; height: 22px; }

  .sec-head { gap: 10px; margin-bottom: 32px; }
  .sec-en { display: none; }

  .file { padding: 18px; }
  .edu-grid { gap: 12px; }
  .life-band-img { aspect-ratio: 3 / 2; }
  .life-band-img img { object-position: 100% center; }
  .life-band figcaption { font-size: 8.5px; flex-direction: column; gap: 4px; }

  .proj--feature { padding: 16px; border-radius: 16px; }
  .proj--card .proj-body { padding: 20px; }
  .proj-visual { height: auto; }
  .proj-title { font-size: 26px; }
  .window-bar { height: 26px; }
  .window-title { font-size: 8.5px; }

  .repo-list a {
    grid-template-columns: 1fr auto;
    grid-template-areas: "name star" "desc desc";
    gap: 2px 10px;
    padding: 13px 4px;
  }
  .repo-name { grid-area: name; }
  .repo-desc { grid-area: desc; white-space: normal; font-size: 11px; line-height: 1.6; }
  .repo-star { grid-area: star; }

  .creds { grid-template-columns: 1fr 1fr; }
  .cred { padding: 14px 16px; }
  .cred b { font-size: 12.5px; }

  .tl-item { grid-template-columns: 1fr; gap: 6px; padding: 20px 0; }
  .tl-when { padding-top: 0; }
  .tl-body { padding-left: 22px; }
  .tl-body::after { bottom: -24px; }

  .contact-bottom { flex-direction: column; align-items: flex-start; gap: 10px; }
  .cb-mid { order: 1; }
  .cb-top { order: 2; align-self: flex-start; }
  .contact-watermark { bottom: -16%; font-size: 40vw; color: rgba(244, 241, 232, 0.018); }
}

@media (max-width: 600px) {
  .now-grid { grid-template-columns: 1fr; gap: 0; }
  .now-item {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    padding: 11px 0;
    border-left: 0;
    border-top: 1px solid var(--line-soft);
  }
  .now-item:first-child { border-top: 0; }
  .now-item p { margin: 0; text-align: right; font-size: 13.5px; }
  .now-k { flex: none; }

  .skill { padding: 24px 20px 22px; }
  .skill-no { top: 24px; right: 20px; }
  .skill-main { font-size: 21px; }
  .skills-learning { font-size: 9.5px; line-height: 1.7; align-items: flex-start; }
  .skills-learning .dot { margin-top: 5px; }

  .menu-btn, .icon-btn { width: 40px; height: 40px; }

  .award-col li { font-size: 12.5px; }
  .cred-k { font-size: 7.5px; }

  .life-band { margin-top: 34px; }
  .file { padding: 18px; }
  .file-name { font-size: 18px; }

  .hero-meta { row-gap: 7px; }
  .hero-meta li { font-size: 10.5px; }

  .more-head { flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 44px; }
  .sec-intro { margin-top: -14px; font-size: 14px; }

  .section { padding: 64px 0; }
  .hero { padding-bottom: 56px; }
  .about-copy p { font-size: 15px; line-height: 1.95; }
  .about-copy .lead { font-size: 22px; }
  .proj-desc { font-size: 14px; line-height: 1.85; }
  .proj-points li { font-size: 12.5px; }

  .hero { padding-top: 84px; }
  .hero-inner { gap: 26px; }
  .hero-title { margin-top: 18px; }
  .hero-tagline { margin-top: 20px; }
  .hero-desc { margin-top: 18px; }
  .hero-actions { margin-top: 26px; }
}

/* ---------- motion / print ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

@media print {
  .nav, .progress, .grain, .marquee, .scroll-hint, .toast, .mobile-menu, .contact-actions { display: none !important; }
  body { background: #fff; color: #000; }
  .hero { min-height: auto; padding: 20px 0; }
  .section, .contact { padding: 24px 0; break-inside: avoid; }
  .contact { background: #fff; color: #000; }
  .contact-title em, .contact-desc { color: #000; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .proj, .card { break-inside: avoid; box-shadow: none; }
}
