/* ============================================================
   Sean — Cuberto-style portfolio
   Design tokens & base
   ============================================================ */

:root {
  /* Color */
  --bg: #000000;
  --bg-soft: #0a0a0a;
  --bg-card: #0d0d0d;
  --bg-hover: #161616;
  --fg: #ffffff;
  --fg-2: #b4b4b4;
  --fg-3: #7a7a7a;
  --fg-4: #5c5c5c;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --line-strong: rgba(255, 255, 255, 0.24);
  /* Restrained accent — indigo, same family as the terminal keyword color.
     Used ONLY for: <em> emphasis, stat numbers, hover states, tag borders. */
  --accent: #818cf8;
  --accent-dim: rgba(129, 140, 248, 0.35);
  --accent-bg: rgba(129, 140, 248, 0.08);

  /* Type */
  --font-sans: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Consolas, monospace;

  /* Layout */
  --container: 1440px;
  --pad-x: clamp(20px, 4vw, 64px);
  --radius: 18px;

  /* Easing */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
  cursor: none;
  transition: opacity 0.18s ease;
}
body.lang-fading { opacity: 0; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: none; }
ul { list-style: none; }

@media (hover: none), (max-width: 900px) {
  body, button, a, summary { cursor: auto; }
  .cursor, .cursor-dot { display: none !important; }
}

/* Selection */
::selection { background: #fff; color: #000; }

/* Keyboard focus — custom cursor hides the pointer, so focus must be visible */
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 1.5px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Touch / active feedback (hover effects don't exist on touch devices) */
.nav-cta:active, .hero-link:active { transform: scale(0.97); }
.skill-card:active { background: var(--bg-hover); }
a.work-item:active { background: var(--bg-soft); }

/* ============================================================
   Cursor — single element: white dot morphs into white circle.
   Position is driven by left/top (instant, no transition → cursor
   stays glued to the pointer). Scale is driven by a CSS variable
   with a long transition → the white dot flows into a big white
   circle on hover instead of a discrete on/off swap.
   ============================================================ */
.cursor {
  position: fixed;
  top: 0; left: 0;
  width: 8px; height: 8px;
  background: #fff;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%) scale(var(--s, 1));
  transition: transform 0.9s var(--ease-out);
  mix-blend-mode: difference;
  will-change: transform, left, top;
}
.cursor.is-hover { --s: 10; }

/* ============================================================
   Loader
   ============================================================ */
.loader {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}
.loader-text {
  display: flex;
  font-size: clamp(48px, 10vw, 120px);
  font-weight: 800;
  letter-spacing: -0.04em;
  gap: 0.04em;
}
.loader-text span {
  display: inline-block;
  opacity: 0;
  transform: translateY(40px);
  animation: loaderChar 0.8s var(--ease-out) forwards;
}
.loader-text span:nth-child(1) { animation-delay: 0.1s; }
.loader-text span:nth-child(2) { animation-delay: 0.2s; }
.loader-text span:nth-child(3) { animation-delay: 0.3s; }
.loader-text span:nth-child(4) { animation-delay: 0.4s; }
@keyframes loaderChar {
  to { opacity: 1; transform: translateY(0); }
}
.loader-progress {
  width: clamp(180px, 30vw, 360px);
  height: 1px;
  background: var(--line);
  overflow: hidden;
}
.loader-bar {
  height: 100%;
  width: 0%;
  background: #fff;
}
.loader-count {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--fg-2);
  letter-spacing: 0.05em;
}
.loader.is-done {
  pointer-events: none;
}
.loader.is-done .loader-inner { opacity: 0; transition: opacity 0.4s; }

/* ============================================================
   Layout
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

.section-head {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--fg-3);
  letter-spacing: 0.04em;
  margin-bottom: 56px;
  text-transform: uppercase;
}
.section-num { color: var(--fg-2); }
.section-label::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--line-2);
  vertical-align: middle;
  margin-right: 12px;
}

/* ============================================================
   Nav
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px var(--pad-x);
  transition: background-color 0.4s var(--ease-out), backdrop-filter 0.4s, padding 0.4s var(--ease-out);
}
.nav.is-scrolled {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding-top: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.nav-logo-dot {
  width: 8px; height: 8px;
  background: #fff;
  border-radius: 50%;
  display: inline-block;
}
.nav-links {
  display: flex;
  gap: clamp(18px, 2.2vw, 36px);
}
.nav-link {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 14px;
  color: var(--fg-2);
  transition: color 0.3s;
}
.nav-link .nav-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-4);
}
.nav-link:hover { color: var(--fg); }
.nav-right {
  display: flex;
  align-items: center;
  gap: 24px;
}
.lang-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
}
.lang-switch button {
  color: var(--fg-4);
  padding: 2px 0;
  transition: color 0.3s var(--ease-out);
  position: relative;
}
.lang-switch button:hover { color: var(--fg-2); }
.lang-switch button.is-active { color: var(--fg); }
.lang-switch button.is-active::after {
  content: "";
  position: absolute;
  left: 0; bottom: -3px;
  width: 100%; height: 1px;
  background: var(--fg);
}
.lang-sep { color: var(--fg-4); }
.nav-cta {
  font-size: 14px;
  padding: 10px 18px;
  border: 1px solid var(--line-2);
  border-radius: 100px;
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}
.nav-cta:hover {
  background: #fff;
  color: #000;
  border-color: #fff;
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-right { gap: 16px; }
}
@media (max-width: 480px) {
  .nav-cta { display: none; }
}

/* Hamburger + full-screen mobile menu */
.nav-burger {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 40px;
  height: 40px;
}
.nav-burger span {
  width: 22px;
  height: 1.5px;
  background: var(--fg);
  transition: transform 0.35s var(--ease-out);
}
.nav-burger.is-open span:nth-child(1) { transform: translateY(3.75px) rotate(45deg); }
.nav-burger.is-open span:nth-child(2) { transform: translateY(-3.75px) rotate(-45deg); }
@media (max-width: 768px) {
  .nav-burger { display: flex; }
}
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 999; /* below .nav so the burger stays reachable */
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  padding: 0 var(--pad-x);
  transform: translateY(-100%);
  visibility: hidden;
  transition: transform 0.55s var(--ease-out), visibility 0s 0.55s;
}
.mobile-menu.is-open {
  transform: none;
  visibility: visible;
  transition: transform 0.55s var(--ease-out);
}
.mobile-menu-links {
  display: flex;
  flex-direction: column;
  width: 100%;
}
.mobile-menu-link {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: clamp(28px, 7vw, 40px);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--fg);
}
.mobile-menu-link .nav-num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-3);
}
.mobile-menu-link:active { color: var(--accent); }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 var(--pad-x);
  padding-top: 120px;
  padding-bottom: 80px;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-grain {
  position: absolute;
  inset: -50%;
  background-image: none;
  /* Keep the Hero background pure black. The grain layer created a dirty
     grey wash over the page, especially on high-brightness displays. */
  opacity: 0;
  pointer-events: none;
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: var(--container);
  margin: 0 auto;
  width: 100%;
}
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-2);
  letter-spacing: 0.04em;
  margin-bottom: 40px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.02);
}
.hero-tag .dot {
  width: 6px; height: 6px;
  background: #4ade80;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.5); }
  70% { box-shadow: 0 0 0 8px rgba(74, 222, 128, 0); }
  100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}
.hero-title {
  font-size: clamp(56px, 13vw, 200px);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.045em;
  margin-bottom: 56px;
}
.hero-line {
  display: block;
  overflow: hidden;
}
.hero-line sup {
  font-size: 0.18em;
  vertical-align: super;
  font-weight: 500;
  color: var(--fg-3);
  margin-left: 0.1em;
}
.hero-scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-3);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  z-index: 1;
}
.hero-scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--fg-3), transparent);
  position: relative;
  overflow: hidden;
}
.hero-scroll-line::after {
  content: "";
  position: absolute;
  top: -40px;
  left: 0;
  width: 100%;
  height: 40px;
  background: #fff;
  animation: scrollDown 1.8s var(--ease-in-out) infinite;
}
@keyframes scrollDown {
  0% { top: -40px; }
  100% { top: 40px; }
}

/* ============================================================
   Hero — numbered narrative over the baked workspace image
   ============================================================ */
.hero-grid {
  position: relative;
  z-index: 1;
  max-width: var(--container);
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
/* Entrance: CSS fadeUp so Hero text is visible on load (no scroll dependency) */
.hero-left > * { animation: fadeUp .7s var(--ease-out) both; }
.hero-left > *:nth-child(2) { animation-delay: .06s; }
.hero-left > *:nth-child(3) { animation-delay: .12s; }
.hero-left > *:nth-child(4) { animation-delay: .18s; }

/* Statement-first hero: oversized short title, single-line inline meta,
   underline text link, and a quiet image-led right side. */
.hero-statement {
  font-size: clamp(44px, 5.6vw, 80px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.04em;
  margin-bottom: 36px;
}
.hero-statement em { font-style: normal; color: var(--accent); }

.hero-inline-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  color: var(--fg-3);
  margin-bottom: 44px;
}
.hero-inline-meta .ok { color: #4ade80; }
.hero-inline-meta .sep { color: var(--fg-4); }

.hero-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 500;
  color: var(--fg);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 4px;
  transition: color 0.3s, border-color 0.3s;
}
.hero-link:hover { color: var(--accent); border-color: var(--accent); }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
}

/* ============================================================
   Hero shell — editorial night workspace + baked profile screen
   The supplied static image contains the full workspace and IDE screen,
   while the HTML layer is reserved for the page copy and navigation.
   ============================================================ */
.hero {
  min-height: 100svh;
  display: block;
  padding: 0;
  background: #000;
}
.hero-bg {
  overflow: hidden;
  background: #000;
}
.hero-scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center center;
}
.hero-vignette {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.28) 0%, rgba(0, 0, 0, 0.04) 42%, rgba(0, 0, 0, 0.18) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.34) 0%, rgba(0, 0, 0, 0.05) 58%, rgba(0, 0, 0, 0.12) 100%);
  pointer-events: none;
}
.hero-grid {
  min-height: 100svh;
  max-width: none;
  margin: 0;
  display: block;
}
.hero-left {
  position: relative;
  z-index: 3;
  width: min(56vw, 760px);
  padding: clamp(190px, 29vh, 300px) var(--pad-x) 160px;
}
.hero-left::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: -44px;
  right: -180px;
  bottom: -110px;
  left: -92px;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0) 38%, rgba(0, 0, 0, 0.18) 78%, rgba(0, 0, 0, 0.28) 100%),
    radial-gradient(ellipse 78% 52% at 38% 58%, rgba(0, 0, 0, 0.68) 0%, rgba(0, 0, 0, 0.52) 42%, rgba(0, 0, 0, 0.26) 68%, rgba(0, 0, 0, 0) 92%);
  filter: blur(10px);
  transform: scale(1.03);
  pointer-events: none;
}
.hero-left > * {
  position: relative;
  z-index: 1;
}
.hero-left .section-head { margin-bottom: 40px; }
.hero .section-num,
.hero .section-label { color: rgba(255, 255, 255, 0.68); }
.hero .section-label::before { background: rgba(255, 255, 255, 0.28); }
.hero-statement {
  max-width: 720px;
  font-size: clamp(48px, 6.2vw, 94px);
  line-height: 1.02;
  letter-spacing: -0.045em;
  margin-bottom: 30px;
  text-wrap: balance;
}
.hero-statement em { color: #c59d62; }
.hero-inline-meta {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.58);
  margin-bottom: 34px;
}
.hero-inline-meta .ok { color: #afc397; }
.hero-link {
  color: #f1eee8;
  border-color: rgba(197, 157, 98, 0.62);
}
.hero-link:hover { color: #d4ae73; border-color: #d4ae73; }
.hero-scroll { z-index: 3; }

@media (max-width: 900px) {
  .hero { min-height: auto; }
  .hero-scene { object-position: 64% bottom; }
  .hero-grid {
    min-height: auto;
    display: flex;
    flex-direction: column;
  }
  .hero-left {
    width: 100%;
    min-height: 70svh;
    padding: 160px var(--pad-x) 76px;
  }
  .hero-left::before {
    top: -30px;
    right: -56px;
    bottom: -70px;
    left: -56px;
    background:
      linear-gradient(180deg, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.22) 100%),
      radial-gradient(ellipse 84% 58% at 42% 58%, rgba(0, 0, 0, 0.64) 0%, rgba(0, 0, 0, 0.42) 46%, rgba(0, 0, 0, 0) 92%);
    filter: blur(8px);
    transform: scale(1.02);
  }
  .hero-statement { font-size: clamp(46px, 12vw, 72px); }
  .hero-inline-meta { font-size: 11px; gap: 7px; }
  .hero-scroll { display: none; }
}

/* ============================================================
   Marquee
   ============================================================ */
.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 22px 0;
  background: var(--bg);
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 36s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-content {
  display: flex;
  align-items: center;
  gap: 40px;
  padding-right: 40px;
}
.marquee-content span {
  font-size: clamp(22px, 3vw, 40px);
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.marquee-dot {
  font-size: 14px !important;
  color: var(--fg-4);
}
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ============================================================
   About
   ============================================================ */
.about {
  padding: clamp(80px, 14vh, 160px) 0;
}
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(40px, 6vw, 100px);
  margin-bottom: 100px;
}
.about-title {
  font-size: clamp(28px, 3.6vw, 52px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--fg);
}
.about-title em {
  font-style: normal;
  color: var(--accent);
}
.about-side {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-top: 8px;
}
.about-text {
  font-size: 16px;
  line-height: 1.65;
  color: var(--fg-2);
}
.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.tag {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 6px 12px;
  border: 1px solid var(--accent-dim);
  border-radius: 100px;
  color: var(--accent);
  letter-spacing: 0.03em;
}
.about-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stat {
  background: var(--bg);
  padding: 36px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: background-color 0.4s;
}
.stat:hover { background: var(--bg-soft); }
.stat-num {
  font-size: clamp(48px, 6vw, 88px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--accent);
  transform-origin: center;
}
.stat-num span {
  color: var(--fg-3);
  font-weight: 400;
}
.stat-label {
  font-size: 13px;
  color: var(--fg-3);
  line-height: 1.4;
}
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   Skills
   ============================================================ */
.skills {
  padding: clamp(80px, 14vh, 160px) 0;
  border-top: 1px solid var(--line);
}
.skills-title {
  font-size: clamp(28px, 3.6vw, 52px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.025em;
  max-width: 900px;
  margin-bottom: 80px;
}
.skills-title em { font-style: normal; color: var(--accent); }
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.skill-card {
  background: var(--bg);
  padding: clamp(32px, 4vw, 56px);
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  transition: background-color 0.4s var(--ease-out);
  overflow: hidden;
}
.skill-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,0.06), transparent 60%);
  opacity: 0;
  transition: opacity 0.5s;
  pointer-events: none;
}
.skill-card:hover { background: var(--bg-soft); }
.skill-card:hover::before { opacity: 1; }
.skill-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-3);
}
/* Skill cards are not links — the ↗ arrow was removed to avoid implying
   clickability. The pointer glow + background shift remain as ambient hover. */
.skill-title {
  font-size: clamp(22px, 2.4vw, 32px);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-top: 8px;
}
.skill-desc {
  font-size: 15px;
  color: var(--fg-2);
  line-height: 1.55;
  max-width: 420px;
}
.skill-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}
.skill-list li {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-3);
  padding-left: 16px;
  position: relative;
}
.skill-list li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--fg-4);
}
@media (max-width: 800px) {
  .skills-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Work
   ============================================================ */
.work {
  padding: clamp(80px, 14vh, 160px) 0;
  border-top: 1px solid var(--line);
}
.work-title {
  font-size: clamp(28px, 3.6vw, 52px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.025em;
  max-width: 900px;
  margin-bottom: 80px;
}
.work-title em { font-style: normal; color: var(--accent); }
.work-list {
  border-top: 1px solid var(--line);
}
.work-item {
  display: grid;
  grid-template-columns: 80px 1fr 280px 40px;
  gap: 32px;
  align-items: center;
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
  position: relative;
  transition: padding 0.5s var(--ease-out), background-color 0.5s var(--ease-out);
  overflow: hidden;
}
.work-item::before {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1px;
  background: #fff;
  transition: width 0.6s var(--ease-out);
}
/* All work/experience/education items get the full hover treatment
   (padding shift, underline, name slide) — clickable or not. Only the ↗
   arrow is reserved for real links. */
.work-item:hover { padding-left: 24px; padding-right: 24px; }
.work-item:hover::before { width: 100%; }
.work-item-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-3);
}
.work-num { color: var(--fg-2); }
.work-item-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.work-name {
  font-size: clamp(28px, 4vw, 56px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  transition: transform 0.5s var(--ease-out);
}
.work-item:hover .work-name { transform: translateX(8px); }
.work-desc {
  font-size: 14px;
  color: var(--fg-2);
  line-height: 1.5;
  max-width: 540px;
  opacity: 0.7;
  transition: opacity 0.4s;
}
.work-item:hover .work-desc { opacity: 1; }
.work-item-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}
.work-item-tags span {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 4px 10px;
  border: 1px solid var(--line-2);
  border-radius: 100px;
  color: var(--fg-3);
}
/* Education tags intentionally share the same style as all other work tags —
   no special glow, one tag language across the site. */
.work-item-arrow {
  font-size: 22px;
  color: var(--fg-3);
  text-align: right;
  transition: transform 0.5s var(--ease-out), color 0.4s;
}
a.work-item:hover .work-item-arrow {
  transform: translate(6px, -6px);
  color: var(--accent);
}
@media (max-width: 900px) {
  .work-item {
    grid-template-columns: 60px 1fr 24px;
    gap: 16px;
    padding: 24px 0;
  }
  .work-item-tags { display: none; }
  .work-item:hover { padding-left: 12px; padding-right: 12px; }
}

/* ============================================================
   Contact
   ============================================================ */
/* ============================================================
   Contact CTA — Cuberto-style "Have an idea?" + TELL US button
   ============================================================ */
.contact-cta {
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-top: 1px solid var(--line);
  padding: clamp(96px, 11vh, 148px) var(--pad-x) clamp(48px, 7vh, 88px);
  text-align: left;
  background: var(--bg);
  isolation: isolate;
}
.contact-visual {
  position: absolute;
  inset: 0;
  z-index: -3;
  background-image: url("assets/contact-night-city.png");
  background-position: center right;
  background-repeat: no-repeat;
  background-size: cover;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.92) 30%, #000 46%, #000 100%);
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.92) 30%, #000 46%, #000 100%);
}
.contact-overlay {
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    linear-gradient(90deg, #000 0%, #000 25%, rgba(0, 0, 0, 0.96) 36%, rgba(0, 0, 0, 0.8) 47%, rgba(0, 0, 0, 0.34) 64%, rgba(0, 0, 0, 0) 86%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.48) 0%, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, 0.12) 75%, #000 100%),
    radial-gradient(ellipse at 94% 50%, rgba(0, 0, 0, 0) 28%, rgba(0, 0, 0, 0.52) 100%);
}
.contact-cta-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  grid-template-rows: auto 1fr;
  column-gap: clamp(48px, 7vw, 120px);
  row-gap: clamp(56px, 8vh, 112px);
  min-height: min(78dvh, 760px);
}
.contact-cta-head {
  grid-column: 1;
  grid-row: 1;
  margin-bottom: 0;
  justify-content: flex-start;
}
.contact-cta-content {
  grid-column: 1;
  grid-row: 2;
  align-self: center;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(30px, 3.6vw, 52px);
  min-width: 0;
}
.contact-cta-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(24px, 2.8vw, 40px);
}
.contact-cta-title {
  max-width: 100%;
  font-size: clamp(58px, 8.5vw, 142px);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: 0;
  color: var(--fg);
}
.contact-cta-line {
  display: block;
  overflow: hidden;
  white-space: nowrap;
}
.contact-cta-description {
  max-width: 31em;
  font-size: clamp(15px, 1.2vw, 18px);
  line-height: 1.75;
  color: var(--fg-2);
}

/* TELL US button — Cuberto signature: bottom-center circle wipe + text roll.
   ::before is a single clean circle scaling up from bottom-center.
   Label and arrow each use a .roll: two stacked copies, on hover the
   original lifts out the top while an inverted copy rolls in from the
   bottom — the classic Cuberto slot-machine text effect. */
.contact-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  padding: clamp(24px, 2.8vw, 40px) clamp(56px, 7vw, 104px);
  border: 1.5px solid var(--fg);
  border-radius: 999px;
  background: transparent;
  color: var(--fg);
  font-size: clamp(22px, 2.5vw, 42px);
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.35s var(--ease-out);
}
.contact-cta-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--fg);
  /* Top half only — flat bottom (button's bottom edge), rounded top arc.
     This is what the wipe shape actually is, not a full circle. */
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  transform: scale(0);
  transform-origin: 50% 100%;
  transition: transform 0.55s cubic-bezier(0.7, 0, 0.2, 1);
  z-index: -1;
}
.contact-cta-btn:hover {
  transform: translateY(-3px) scale(1.015);
}
.contact-cta-btn:hover::before { transform: scale(1.5); }

/* Vertical text roll — shared by label and arrow */
.roll {
  position: relative;
  z-index: 1;
  display: inline-block;
  overflow: hidden;
  vertical-align: middle;
  line-height: 1.25;
}
.roll > span {
  display: block;
  transition: transform 0.45s var(--ease-out);
  white-space: nowrap;
}
.roll > span + span {
  position: absolute;
  top: 100%;
  left: 0;
  color: var(--bg);
}
.contact-cta-btn:hover .roll > span {
  transform: translateY(-100%);
}
.roll-arrow { line-height: 1; }

.contact-cta-links {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: clamp(18px, 2.8vw, 42px);
  padding-top: 24px;
  border-top: 1px solid var(--line);
  width: 100%;
  max-width: 720px;
  justify-content: flex-start;
}
.contact-cta-links a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding-bottom: 7px;
  transition: color 0.35s var(--ease-out), transform 0.4s var(--ease-out);
}
.contact-cta-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.4s var(--ease-out);
}
.contact-cta-links a:hover {
  color: var(--accent);
  transform: translateY(-2px);
}
.contact-cta-links a:hover::after { width: 100%; }
.contact-link-icon {
  display: inline-flex;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  color: var(--fg-2);
  transition: color 0.35s var(--ease-out);
}
.contact-link-icon svg {
  width: 100%;
  height: 100%;
}
.contact-cta-links a:hover .contact-link-icon { color: var(--accent); }
.contact-link-text {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}
.contact-link-label {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
}
.contact-link-meta {
  color: var(--fg-3);
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.3;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: color 0.35s var(--ease-out);
}
.contact-cta-links a:hover .contact-link-meta { color: var(--accent); }
.contact-link-icon-github { color: var(--fg-2); }
.contact-link-icon-wechat,
.contact-link-icon-social { color: var(--fg-2); }

/* Social links stay compact in the contact row and reveal their three
   same-name platforms only when the visitor asks for them. */
.contact-social {
  position: relative;
  flex: 1 1 158px;
  min-width: 0;
}
.contact-social-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
  padding-bottom: 7px;
  list-style: none;
  cursor: none;
  transition: color 0.35s var(--ease-out), transform 0.4s var(--ease-out);
}
.contact-social-toggle::-webkit-details-marker { display: none; }
.contact-social-toggle::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.4s var(--ease-out);
}
.contact-social-toggle:hover {
  color: var(--accent);
  transform: translateY(-2px);
}
.contact-social-toggle:hover::after,
.contact-social[open] .contact-social-toggle::after { width: 100%; }
.contact-social-toggle:hover .contact-link-icon,
.contact-social[open] .contact-link-icon { color: var(--accent); }
.contact-social-toggle:hover .contact-link-meta,
.contact-social[open] .contact-link-meta { color: var(--accent); }
.contact-social-toggle-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  margin-left: auto;
  border: 1px solid currentColor;
  border-radius: 50%;
  color: var(--fg-3);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1;
  transition: color 0.35s var(--ease-out), transform 0.35s var(--ease-out);
}
.contact-social[open] .contact-social-toggle-mark {
  color: var(--accent);
  transform: rotate(45deg);
}
.contact-social-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 16px);
  z-index: 4;
  width: min(300px, calc(100vw - 40px));
  padding: 16px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: rgba(10, 10, 10, 0.96);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}
.contact-social-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.contact-social-panel-title {
  font-size: 14px;
  font-weight: 500;
}
.contact-social-panel-meta {
  color: var(--fg-3);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.contact-social-platforms {
  display: grid;
  gap: 0;
  margin-top: 4px;
}
.contact-social-platform {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  transition: color 0.35s var(--ease-out), transform 0.35s var(--ease-out);
}
.contact-social-platform:last-child { border-bottom: 0; padding-bottom: 2px; }
.contact-social-platform:hover {
  color: var(--accent);
  transform: translateX(4px);
}
.social-platform-logo {
  display: block;
  width: 26px;
  height: 26px;
  object-fit: contain;
  transition: transform 0.35s var(--ease-out), filter 0.35s var(--ease-out);
}
.social-platform-logo-douyin {
  width: 36px;
  height: 24px;
  filter: brightness(0) invert(1);
}
.social-platform-logo-xiaohongshu {
  border-radius: 8px;
}
.social-platform-logo-x {
  width: 23px;
  height: 24px;
}
.contact-social-platform:hover .social-platform-logo {
  transform: scale(1.06);
}
.social-platform-name {
  font-size: 13px;
  font-weight: 500;
}
.social-platform-action {
  color: var(--fg-3);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  transition: color 0.35s var(--ease-out);
}
.contact-social-platform:hover .social-platform-action { color: var(--accent); }

@media (prefers-reduced-motion: no-preference) {
  .contact-social-panel { animation: socialPanelIn 0.28s var(--ease-out) both; }
  @keyframes socialPanelIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

@media (max-width: 900px) {
  .contact-cta {
    align-items: flex-start;
    padding: clamp(112px, 17vw, 144px) var(--pad-x) 48px;
  }
  .contact-visual {
    background-position: 72% bottom;
    background-size: auto 74%;
    opacity: 0.86;
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 36%, #000 100%);
    mask-image: linear-gradient(180deg, transparent 0%, #000 36%, #000 100%);
  }
  .contact-overlay {
    background:
      linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.97) 34%, rgba(0, 0, 0, 0.72) 58%, rgba(0, 0, 0, 0.88) 100%),
      linear-gradient(90deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.28) 100%);
  }
  .contact-cta-inner {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
    row-gap: clamp(64px, 13vh, 104px);
    min-height: auto;
  }
  .contact-cta-head {
    grid-column: 1;
    grid-row: 1;
  }
  .contact-cta-content {
    grid-column: 1;
    grid-row: 2;
    align-self: start;
    gap: clamp(42px, 11vw, 72px);
  }
  .contact-cta-title {
    font-size: clamp(58px, 17vw, 100px);
    line-height: 1.02;
  }
  .contact-cta-description {
    font-size: 15px;
    line-height: 1.7;
  }
  .contact-cta-btn {
    gap: 14px;
    padding: 20px 34px;
    font-size: clamp(19px, 5vw, 24px);
  }
  .contact-cta-links {
    max-width: none;
    gap: 16px 24px;
  }
  .contact-social { flex-basis: 130px; }
  .contact-social-panel {
    right: auto;
    left: 0;
  }
  .contact-cta-links a {
    flex: 1 1 130px;
  }
  .contact-link-meta {
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 420px) {
  .contact-cta-inner { row-gap: 56px; }
  .contact-cta-links { gap: 16px 18px; }
  .contact-cta-links a { flex-basis: 120px; }
  .contact-social { flex-basis: 120px; }
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
  padding: 32px 0;
  border-top: 1px solid var(--line);
  background: var(--bg);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-left {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 16px;
}
.footer-tagline {
  font-size: 12px;
  color: var(--fg-3);
}
.footer-right {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-3);
}
.footer-time {
  color: var(--fg-2);
}

/* ============================================================
   Reveal animations — initial hidden state is gated behind the .js class
   (added by script.js as its first statement). If JS or the GSAP CDN fails,
   content stays fully visible instead of being stuck at opacity:0.
   ============================================================ */
.js .reveal-up { opacity: 0; transform: translateY(40px); }
.js .reveal-text { display: inline-block; transform: translateY(110%); }
.reveal-line em { font-style: normal; }

/* Chinese typography — CJK glyphs need breathing room, not tight Latin tracking */
html[lang="zh-CN"] .hero-statement,
html[lang="zh-CN"] .about-title,
html[lang="zh-CN"] .skills-title,
html[lang="zh-CN"] .work-title {
  letter-spacing: 0;
  line-height: 1.3;
}
html[lang="zh-CN"] .contact-cta-title,
html[lang="zh-CN"] .marquee-content span {
  letter-spacing: 0;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .js .reveal-up { opacity: 1; transform: none; }
  .js .reveal-text { transform: none; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 0; }
