/* ==========================================================================
   PeanutsLOL — styles
   --------------------------------------------------------------------------
   1. Tokens & base     2. Utilities      3. Header / navigation
   4. Hero              5. Ticker         6. Work / projects
   7. About             8. Contact        9. Footer
   10. Motion           11. Responsive     12. Preferences / fallbacks
   Design tokens live in :root — see docs/EDITING.md before changing them.
   ========================================================================== */

/* 1. Tokens & base ------------------------------------------------------- */

:root {
  color-scheme: dark;

  --bg: #0a0b0f;
  --bg-soft: #0c0e13;
  --surface: #12141b;
  --surface-raised: #181b23;
  --card-bg: #111319;

  --ink: #f2f0e9;
  --muted: #a3a1ad;
  --dim: #7f7d8a;

  --line: rgba(242, 240, 233, 0.12);
  --line-strong: rgba(242, 240, 233, 0.24);

  --accent: #d8ff57;
  --accent-contrast: #0b0d07;
  --accent-text: #d8ff57;
  --pink: #ff8fc7;

  --shadow: 0 30px 90px rgba(0, 0, 0, 0.5);
  --shadow-soft: 0 18px 50px rgba(0, 0, 0, 0.28);

  --radius: 26px;
  --radius-sm: 16px;
  --header-h: 78px;
  --maxw: 1320px;
  --gutter: clamp(20px, 4vw, 64px);

  --font-sans: "Space Grotesk", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Noto Sans SC", sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --font-serif: "Instrument Serif", "Songti SC", "STSong", Georgia, serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
  color-scheme: light;

  --bg: #f2f0e8;
  --bg-soft: #eae7dd;
  --surface: #faf8f1;
  --surface-raised: #fffdf8;
  --card-bg: #fbf9f2;

  --ink: #12130f;
  --muted: #5d5f57;
  --dim: #686a60;

  --line: rgba(18, 19, 15, 0.13);
  --line-strong: rgba(18, 19, 15, 0.26);

  --accent: #c9ef3d;
  --accent-contrast: #101205;
  --accent-text: #4d6300;
  --pink: #b52d73;

  --shadow: 0 30px 80px rgba(46, 43, 30, 0.16);
  --shadow-soft: 0 18px 50px rgba(46, 43, 30, 0.1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

#home,
#work,
#about,
#contact,
.project,
.project-card {
  scroll-margin-top: calc(var(--header-h) + 20px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition:
    background-color 0.4s var(--ease-soft),
    color 0.4s var(--ease-soft);
}

body.menu-open {
  overflow: hidden;
}

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

h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  color: inherit;
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border: 3px solid var(--bg);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* 2. Utilities ----------------------------------------------------------- */

.shell {
  width: min(100%, calc(var(--maxw) + var(--gutter) * 2));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.mono-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  line-height: 1.4;
  text-transform: uppercase;
}

.mono-label::before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-text);
  content: "";
  flex: none;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 26px;
  height: 1px;
  background: var(--accent-text);
  content: "";
  flex: none;
}

.section {
  width: min(100%, calc(var(--maxw) + var(--gutter) * 2));
  margin-inline: auto;
  padding: clamp(88px, 11vw, 150px) var(--gutter);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.55fr);
  gap: clamp(32px, 6vw, 90px);
  align-items: end;
  margin-bottom: clamp(38px, 5vw, 62px);
}

.section-head__title {
  margin-top: 22px;
  font-size: clamp(3.1rem, 6.5vw, 6rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 0.92;
}

.section-head__title span {
  display: block;
}

.section-head__title span:last-child {
  padding-left: clamp(0px, 5vw, 72px);
}

.section-head__aside {
  padding-bottom: 7px;
}

.section-head__aside p {
  max-width: 34em;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.85;
}

.section-head__aside .text-link {
  margin-top: 22px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--line-strong);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  transition:
    color 0.25s ease,
    border-color 0.25s ease;
}

.text-link svg {
  width: 13px;
  height: 13px;
  transition: transform 0.3s var(--ease);
}

.text-link:hover {
  border-color: var(--accent-text);
  color: var(--accent-text);
}

.text-link:hover svg {
  transform: translate(2px, -2px);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 23px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.71rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  line-height: 1;
  transition:
    background-color 0.25s ease,
    border-color 0.25s ease,
    color 0.25s ease,
    transform 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}

.btn svg {
  width: 15px;
  height: 15px;
  flex: none;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn--primary {
  background: var(--accent);
  color: var(--accent-contrast);
}

.btn--primary:hover {
  box-shadow: 0 12px 32px color-mix(in srgb, var(--accent) 22%, transparent);
}

.btn--ghost {
  border-color: var(--line-strong);
  background: transparent;
  color: var(--ink);
}

.btn--ghost:hover {
  border-color: var(--accent-text);
  color: var(--accent-text);
}

.btn--dark {
  background: #0c0e09;
  color: #f4f2e9;
}

.btn--dark:hover {
  background: #1b1e14;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.btn--outline-dark {
  border-color: rgba(10, 12, 6, 0.32);
  background: transparent;
  color: #0c0e09;
}

.btn--outline-dark:hover {
  border-color: #0c0e09;
  background: rgba(10, 12, 6, 0.06);
}

.icon {
  width: 18px;
  height: 18px;
}

.skip-link {
  position: fixed;
  z-index: 500;
  top: 12px;
  left: 12px;
  padding: 12px 18px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-contrast);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.scroll-progress {
  position: fixed;
  z-index: 400;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  will-change: transform;
}

.page-grain {
  position: fixed;
  z-index: 390;
  inset: 0;
  opacity: 0.035;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

/* 3. Header / navigation ------------------------------------------------- */

.site-header {
  position: fixed;
  z-index: 120;
  top: 0;
  left: 0;
  width: 100%;
  border-bottom: 1px solid transparent;
  transition:
    background-color 0.35s ease,
    border-color 0.35s ease,
    backdrop-filter 0.35s ease;
}

.site-header.is-scrolled {
  border-color: var(--line);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
}

.header__inner {
  display: flex;
  align-items: center;
  width: min(100%, calc(var(--maxw) + var(--gutter) * 2));
  height: var(--header-h);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: none;
}

.brand__mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: -0.04em;
  transition:
    background-color 0.25s ease,
    color 0.25s ease,
    border-color 0.25s ease,
    transform 0.4s var(--ease);
}

.brand:hover .brand__mark {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-contrast);
  transform: rotate(-8deg);
}

.brand__word {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-inline: auto;
}

.site-nav a {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  padding: 5px 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.67rem;
  letter-spacing: 0.08em;
  transition: color 0.25s ease;
}

.site-nav a::after {
  position: absolute;
  right: 0;
  bottom: -3px;
  left: 0;
  height: 1px;
  background: var(--accent-text);
  content: "";
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 0.35s var(--ease);
}

.site-nav a span {
  color: var(--dim);
  font-size: 0.55rem;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--ink);
}

.site-nav a:hover::after,
.site-nav a.is-active::after {
  transform: scaleX(1);
  transform-origin: left center;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.icon-btn {
  display: grid;
  width: 40px;
  height: 40px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition:
    color 0.25s ease,
    border-color 0.25s ease,
    background-color 0.25s ease;
}

.icon-btn:hover {
  border-color: var(--accent-text);
  color: var(--accent-text);
}

.theme-toggle .icon {
  width: 16px;
  height: 16px;
}

.icon--sun {
  display: none;
}

[data-theme="light"] .icon--moon {
  display: none;
}

[data-theme="light"] .icon--sun {
  display: block;
}

.header__github {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  transition:
    background-color 0.25s ease,
    border-color 0.25s ease,
    color 0.25s ease;
}

.header__github .icon {
  width: 14px;
  height: 14px;
  transition: transform 0.3s var(--ease);
}

.header__github:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-contrast);
}

.header__github:hover .icon {
  transform: translate(2px, -2px);
}

.menu-btn {
  display: none;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
}

.menu-btn__lines {
  display: grid;
  gap: 4px;
}

.menu-btn__lines i {
  display: block;
  width: 18px;
  height: 1px;
  background: currentColor;
  transition: transform 0.3s var(--ease);
}

.menu-btn:hover .menu-btn__lines i:first-child {
  transform: translateY(-2px);
}

.menu-btn:hover .menu-btn__lines i:last-child {
  transform: translateY(2px);
}

/* Mobile navigation */

.mobile-nav {
  position: fixed;
  z-index: 200;
  inset: 0;
  display: flex;
  visibility: hidden;
  flex-direction: column;
  padding: 22px var(--gutter) 32px;
  background: var(--bg);
  opacity: 0;
  clip-path: inset(0 0 100% 0);
  transition:
    clip-path 0.65s var(--ease),
    opacity 0.35s ease,
    visibility 0.65s;
}

.mobile-nav.is-open {
  visibility: visible;
  opacity: 1;
  clip-path: inset(0 0 0 0);
}

.mobile-nav__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.mobile-nav__links {
  display: flex;
  flex-direction: column;
  margin-top: 32px;
}

.mobile-nav__links a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  font-size: clamp(2.3rem, 11vw, 3.5rem);
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 1.1;
}

.mobile-nav__links a small {
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
}

.mobile-nav__links a:hover {
  color: var(--accent-text);
}

.mobile-nav__foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-top: auto;
  padding-top: 32px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  line-height: 1.8;
}

.mobile-nav__foot a {
  color: var(--accent-text);
  text-align: right;
}

/* 4. Hero ---------------------------------------------------------------- */

.hero {
  position: relative;
  display: flex;
  min-height: 100svh;
  flex-direction: column;
  overflow: clip;
  padding: calc(var(--header-h) + clamp(40px, 7vh, 88px)) 0 0;
}

.hero::before {
  position: absolute;
  z-index: 0;
  top: -20%;
  right: -12%;
  width: 62vw;
  height: 62vw;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    color-mix(in srgb, var(--accent) 11%, transparent) 0%,
    transparent 66%
  );
  content: "";
  pointer-events: none;
}

.hero::after {
  position: absolute;
  z-index: 0;
  right: -0.1em;
  bottom: 2%;
  color: transparent;
  content: "P/";
  font-size: clamp(20rem, 42vw, 46rem);
  font-weight: 600;
  letter-spacing: -0.12em;
  line-height: 0.7;
  opacity: 0.5;
  pointer-events: none;
  -webkit-text-stroke: 1px var(--line);
}

.hero__inner {
  position: relative;
  z-index: 2;
  display: grid;
  width: min(100%, calc(var(--maxw) + var(--gutter) * 2));
  flex: 1;
  grid-template-columns: minmax(0, 1.26fr) minmax(320px, 0.74fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: center;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.hero__copy {
  position: relative;
  z-index: 3;
  padding: 24px 0 42px;
}

.hero__eyebrow {
  animation: none;
}

.hero__title {
  margin: 22px 0 0;
  font-size: clamp(4rem, 9.3vw, 9.6rem);
  font-weight: 500;
  letter-spacing: -0.07em;
  line-height: 0.82;
  text-transform: uppercase;
}

.hero__title-line {
  display: block;
  width: max-content;
}

.hero__title-line--bottom {
  padding-left: clamp(0px, 5vw, 76px);
}

.hero__title-dot {
  color: var(--accent-text);
}

.hero__alias {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 23px;
  padding: 7px 13px 7px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.63rem;
  letter-spacing: 0.04em;
  transform: rotate(-1.5deg);
  transform-origin: left center;
}

.hero__alias b {
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--surface-raised);
  color: var(--ink);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.hero__intro {
  max-width: 35em;
  margin-top: 28px;
  color: var(--muted);
  font-size: clamp(0.98rem, 1.15vw, 1.08rem);
  line-height: 1.95;
}

.hero__intro-en {
  margin-top: 17px;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.17em;
  line-height: 1.7;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 31px;
}

.hero__stats {
  position: relative;
  z-index: 2;
  display: grid;
  width: min(100%, calc(var(--maxw) + var(--gutter) * 2));
  grid-template-columns: repeat(4, 1fr);
  margin: clamp(34px, 5vh, 58px) auto 0;
  padding-inline: var(--gutter);
}

.stat {
  padding: 21px 0 20px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stat:not(:first-child) {
  padding-left: clamp(16px, 2.4vw, 36px);
  border-left: 1px solid var(--line);
}

.stat__value {
  font-size: clamp(1.65rem, 2.8vw, 2.55rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 1;
}

.stat__value sup {
  position: relative;
  top: -0.8em;
  margin-left: 3px;
  color: var(--accent-text);
  font-family: var(--font-mono);
  font-size: 0.38em;
  letter-spacing: 0;
}

.stat__label {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}

.stat__note {
  margin-top: 3px;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.13em;
}

.stat:nth-child(3) .stat__value {
  font-size: clamp(1.25rem, 2vw, 1.9rem);
  letter-spacing: -0.04em;
}

/* Portrait / profile card */

.hero__visual {
  position: relative;
  z-index: 2;
  display: grid;
  min-height: 560px;
  place-items: center;
}

.portrait-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 78%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    color-mix(in srgb, var(--pink) 20%, transparent) 0%,
    color-mix(in srgb, var(--accent) 8%, transparent) 44%,
    transparent 69%
  );
  filter: blur(18px);
  transform: translate(-50%, -50%);
}

.portrait-orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(120%, 530px);
  aspect-ratio: 1;
  border: 1px dashed var(--line-strong);
  border-radius: 50%;
  animation: orbit-spin 70s linear infinite;
  transform: translate(-50%, -50%);
}

.portrait-orbit::before,
.portrait-orbit::after {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 10%, transparent);
  content: "";
}

.portrait-orbit::before {
  top: 13%;
  right: 14%;
}

.portrait-orbit::after {
  bottom: 9%;
  left: 21%;
  background: var(--pink);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--pink) 10%, transparent);
}

.id-card {
  position: relative;
  z-index: 3;
  width: min(100%, 350px);
  padding: 17px;
  border: 1px solid rgba(15, 16, 12, 0.12);
  border-radius: 17px;
  background: #f3f0e5;
  box-shadow:
    0 35px 95px rgba(0, 0, 0, 0.45),
    0 1px 0 rgba(255, 255, 255, 0.5) inset;
  color: #11120e;
  transform: rotate(-4deg);
  transition: transform 0.7s var(--ease);
}

[data-theme="light"] .id-card {
  box-shadow:
    0 32px 70px rgba(52, 47, 29, 0.25),
    0 1px 0 rgba(255, 255, 255, 0.7) inset;
}

.id-card:hover {
  transform: rotate(-1.2deg) translateY(-7px);
}

.id-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
  color: #67685e;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.13em;
}

.id-card__head span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.id-card__head span:first-child::before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #5f7d00;
  content: "";
}

.id-card__photo {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1.27 / 1;
  border-radius: 9px;
  background: #d8d3c5;
}

.id-card__photo::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(16, 16, 12, 0.26));
  content: "";
  pointer-events: none;
}

.id-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 24%;
  filter: saturate(0.92) contrast(1.04);
  transition: transform 0.7s var(--ease);
}

.id-card:hover .id-card__photo img {
  transform: scale(1.035);
}

.id-card__name {
  margin-top: 15px;
  font-size: 1.72rem;
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.id-card__handle {
  margin-top: 4px;
  color: #5e6055;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.04em;
}

.id-card__rows {
  margin-top: 14px;
  border-top: 1px solid rgba(16, 17, 13, 0.16);
}

.id-card__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px dashed rgba(16, 17, 13, 0.14);
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.04em;
}

.id-card__row dt {
  color: #7f8075;
  letter-spacing: 0.1em;
}

.id-card__row dd {
  overflow: hidden;
  color: #292a23;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.id-card__foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

.id-card__barcode {
  width: 46%;
  height: 25px;
  opacity: 0.72;
  background: repeating-linear-gradient(
    90deg,
    #11120e 0 1px,
    transparent 1px 4px,
    #11120e 4px 6px,
    transparent 6px 8px,
    #11120e 8px 9px,
    transparent 9px 13px
  );
}

.id-card__foot span {
  color: #76786c;
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.08em;
  text-align: right;
}

.portrait-sticker {
  position: absolute;
  z-index: 5;
  top: 9%;
  right: 2%;
  padding: 9px 11px;
  border: 1px solid rgba(10, 12, 6, 0.18);
  background: var(--accent);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  color: var(--accent-contrast);
  font-family: var(--font-mono);
  font-size: 0.55rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  line-height: 1.55;
  text-align: center;
  transform: rotate(7deg);
}

.portrait-sticker span {
  display: block;
  font-size: 0.56rem;
  font-weight: 400;
  opacity: 0.68;
}

.portrait-chip {
  position: absolute;
  z-index: 4;
  padding: 7px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.08em;
  animation: chip-float 7s ease-in-out infinite;
}

.portrait-chip--one {
  top: 19%;
  left: 0;
}

/* 5. Ticker -------------------------------------------------------------- */

.ticker {
  position: relative;
  z-index: 4;
  overflow: hidden;
  border-block: 1px solid color-mix(in srgb, var(--accent-contrast) 16%, transparent);
  background: var(--accent);
  color: var(--accent-contrast);
}

.ticker__track {
  display: flex;
  width: max-content;
  animation: ticker-marquee 34s linear infinite;
}

.ticker:hover .ticker__track {
  animation-play-state: paused;
}

.ticker__group {
  display: flex;
  flex: none;
  align-items: center;
  padding: 14px 0;
}

.ticker__item {
  display: inline-flex;
  align-items: center;
  gap: 30px;
  padding-right: 30px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  white-space: nowrap;
}

.ticker__item::after {
  content: "✦";
  font-size: 0.7rem;
  opacity: 0.55;
}

/* 6. Work / projects ----------------------------------------------------- */

.work {
  position: relative;
  background: var(--bg);
}

.work__count {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 22px;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.12em;
}

.work__count::before {
  width: 16px;
  height: 1px;
  background: var(--line-strong);
  content: "";
}

.project {
  display: block;
  color: inherit;
}

.project--featured {
  position: relative;
  display: grid;
  overflow: hidden;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  min-height: 508px;
  border: 1px solid rgba(216, 255, 87, 0.18);
  border-radius: var(--radius);
  background: #0d1009;
  box-shadow: var(--shadow-soft);
  color: #f3f1e7;
  isolation: isolate;
  transition:
    border-color 0.4s ease,
    transform 0.5s var(--ease),
    box-shadow 0.5s var(--ease);
}

.project--featured::before {
  position: absolute;
  z-index: 0;
  top: -35%;
  right: -15%;
  width: 68%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(216, 255, 87, 0.14) 0%,
    rgba(255, 143, 199, 0.05) 38%,
    transparent 68%
  );
  content: "";
  pointer-events: none;
}

.project--featured:hover {
  border-color: rgba(216, 255, 87, 0.42);
  box-shadow: 0 38px 100px rgba(0, 0, 0, 0.5);
  transform: translateY(-4px);
}

.project__body {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  padding: clamp(28px, 3.8vw, 48px);
}

.project__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #8d9282;
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.11em;
}

.project__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border: 1px solid rgba(216, 255, 87, 0.28);
  border-radius: 999px;
  color: #d8ff57;
  font-size: 0.58rem;
  letter-spacing: 0.12em;
}

.project__badge::before {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.project__title {
  margin-top: clamp(26px, 4vw, 44px);
  font-size: clamp(2.55rem, 4vw, 4.1rem);
  font-weight: 500;
  letter-spacing: -0.06em;
  line-height: 0.92;
}

.project__tagline {
  max-width: 23em;
  margin-top: 16px;
  color: #d8ff57;
  font-size: clamp(1rem, 1.35vw, 1.16rem);
  letter-spacing: -0.01em;
  line-height: 1.55;
}

.project__desc {
  max-width: 31em;
  margin-top: 14px;
  color: #a5aa9c;
  font-size: 0.88rem;
  line-height: 1.8;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 22px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  color: #bdc1b4;
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.04em;
  line-height: 1;
}

.project__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.project__stars {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #8d9282;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.08em;
}

.project__stars svg {
  width: 12px;
  height: 12px;
  color: #d8ff57;
}

.project__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #f3f1e7;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.04em;
}

.project__cta .arrow {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease,
    color 0.3s ease,
    transform 0.4s var(--ease);
}

.project__cta .arrow svg {
  width: 14px;
  height: 14px;
}

.project--featured:hover .project__cta .arrow {
  border-color: #d8ff57;
  background: #d8ff57;
  color: #0d1009;
  transform: rotate(45deg);
}

.project__visual {
  position: relative;
  z-index: 1;
  display: grid;
  min-width: 0;
  place-items: center;
  padding: 38px 38px 38px 8px;
}

.app-window {
  position: relative;
  width: 100%;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 11px;
  background: #0b0c0f;
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.48),
    0 0 0 5px rgba(255, 255, 255, 0.025);
  transform: perspective(1400px) rotateY(-5deg) rotateX(1.5deg);
  transition:
    transform 0.8s var(--ease),
    border-color 0.4s ease;
}

.project--featured:hover .app-window {
  border-color: rgba(216, 255, 87, 0.38);
  transform: perspective(1400px) rotateY(0deg) rotateX(0deg) translateY(-5px);
}

.app-window__bar {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 29px;
  padding: 0 11px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  background: #12140f;
}

.app-window__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #454a3d;
}

.app-window__dot:first-child {
  background: #ff8fc7;
}

.app-window__title {
  margin-left: 5px;
  color: #797e70;
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.06em;
}

.app-window img {
  width: 100%;
  height: auto;
}

.visual-chip {
  position: absolute;
  right: 19px;
  bottom: 17px;
  padding: 6px 9px;
  border: 1px solid rgba(216, 255, 87, 0.24);
  border-radius: 999px;
  background: rgba(10, 12, 8, 0.82);
  color: #d8ff57;
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.1em;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.project-card {
  position: relative;
  display: flex;
  overflow: hidden;
  flex-direction: column;
  min-height: 492px;
  border: 1px solid var(--line);
  border-radius: 23px;
  background: var(--card-bg);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--ink) 3%, transparent) inset;
  isolation: isolate;
  transition:
    border-color 0.35s ease,
    transform 0.5s var(--ease),
    box-shadow 0.5s var(--ease);
}

.project-card::after {
  position: absolute;
  z-index: 4;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    340px circle at var(--pointer-x, 50%) var(--pointer-y, 0%),
    color-mix(in srgb, var(--card-accent, var(--accent)) 9%, transparent),
    transparent 65%
  );
  content: "";
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.project-card:hover {
  border-color: color-mix(in srgb, var(--card-accent, var(--accent)) 45%, var(--line));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.2);
  transform: translateY(-6px);
}

.project-card:hover::after {
  opacity: 1;
}

.project-card__art {
  position: relative;
  overflow: hidden;
  height: 218px;
  border-bottom: 1px solid var(--line);
  background: #0f1115;
}

.project-art {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(
      circle at 72% 18%,
      color-mix(in srgb, var(--card-accent) 20%, transparent),
      transparent 46%
    ),
    linear-gradient(145deg, #161821 0%, #0d0f13 75%);
}

.project-art::before {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 38px 38px;
  content: "";
  mask-image: linear-gradient(to bottom, black, transparent 85%);
  opacity: 0.8;
}

.project-art::after {
  position: absolute;
  right: -15%;
  bottom: -50%;
  width: 65%;
  aspect-ratio: 1;
  border: 1px solid color-mix(in srgb, var(--card-accent) 24%, transparent);
  border-radius: 50%;
  content: "";
}

.art-label {
  position: absolute;
  z-index: 5;
  top: 16px;
  left: 17px;
  color: rgba(255, 255, 255, 0.55);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
}

.art-label--right {
  right: 17px;
  left: auto;
  color: var(--card-accent);
}

.art-caption {
  position: absolute;
  z-index: 5;
  bottom: 15px;
  left: 17px;
  color: rgba(255, 255, 255, 0.42);
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.1em;
}

.project-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 22px 22px 21px;
}

.project-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.11em;
}

.project-card__kind {
  color: color-mix(in srgb, var(--card-accent) 70%, var(--ink));
}

.project-card__title {
  margin-top: 15px;
  font-size: clamp(1.35rem, 1.75vw, 1.64rem);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.project-card__title--long {
  font-size: clamp(1rem, 4.4vw, 1.45rem);
  letter-spacing: -0.05em;
}

.project-card__tagline {
  margin-top: 10px;
  color: color-mix(in srgb, var(--card-accent) 65%, var(--ink));
  font-size: 0.79rem;
  line-height: 1.55;
}

.project-card__desc {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.75;
}

.project-card .tags {
  margin-top: 16px;
  gap: 5px;
}

.project-card .tag {
  border-color: var(--line);
  color: var(--muted);
  font-size: 0.54rem;
}

.project-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 18px;
}

.project-card__stars {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 0.58rem;
}

.project-card__stars svg {
  width: 11px;
  height: 11px;
  color: color-mix(in srgb, var(--card-accent) 80%, var(--ink));
}

.project-card__open {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.55rem;
}

.project-card__open svg {
  width: 13px;
  height: 13px;
  transition: transform 0.35s var(--ease);
}

.project-card:hover .project-card__open svg {
  transform: translate(2px, -2px);
}

/* Project artwork — rune */

.art--rune {
  background:
    radial-gradient(circle at 50% 48%, rgba(255, 143, 199, 0.18), transparent 55%),
    linear-gradient(145deg, #1b1119 0%, #0e0d13 74%);
}

.rune-field {
  position: absolute;
  z-index: 2;
  top: 52%;
  left: 50%;
  width: 164px;
  height: 164px;
  transform: translate(-50%, -50%);
}

.rune-ring {
  position: absolute;
  inset: 0;
  border: 1px dashed rgba(255, 143, 199, 0.45);
  border-radius: 50%;
  animation: orbit-spin 34s linear infinite;
}

.rune-ring::before {
  position: absolute;
  inset: 13px;
  border: 1px solid rgba(255, 143, 199, 0.18);
  border-radius: 50%;
  content: "";
}

.rune-core {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  border: 1px solid rgba(255, 143, 199, 0.7);
  background: rgba(255, 143, 199, 0.07);
  box-shadow:
    0 0 35px rgba(255, 143, 199, 0.12),
    0 0 0 7px rgba(255, 143, 199, 0.025);
  transform: translate(-50%, -50%) rotate(45deg);
}

.rune-core span {
  color: #ffc1df;
  font-family: var(--font-mono);
  font-size: 0.47rem;
  letter-spacing: 0.18em;
  transform: rotate(-45deg);
}

.rune-node {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ff8fc7;
  box-shadow: 0 0 9px rgba(255, 143, 199, 0.8);
}

.rune-node--1 {
  top: 7%;
  left: 49%;
}

.rune-node--2 {
  top: 49%;
  right: 5%;
}

.rune-node--3 {
  bottom: 8%;
  left: 37%;
}

.rune-node--4 {
  top: 33%;
  left: 9%;
}

.rune-glyph {
  position: absolute;
  z-index: 3;
  top: 31%;
  left: 16%;
  color: rgba(255, 193, 223, 0.4);
  font-family: var(--font-serif);
  font-size: 1.8rem;
  transform: rotate(-14deg);
}

.rune-glyph--two {
  top: 58%;
  right: 15%;
  left: auto;
  color: rgba(255, 143, 199, 0.24);
  font-size: 1.2rem;
  transform: rotate(16deg);
}

/* Project artwork — mahjong */

.art--mahjong {
  background:
    radial-gradient(circle at 26% 80%, rgba(156, 220, 255, 0.16), transparent 48%),
    linear-gradient(145deg, #0e171d 0%, #0c0f14 78%);
}

.mahjong-tiles {
  position: absolute;
  z-index: 3;
  top: 53%;
  left: 47%;
  display: flex;
  gap: 6px;
  transform: translate(-50%, -50%);
}

.mahjong-tile {
  display: grid;
  width: 51px;
  height: 68px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 6px;
  background: #f2efe2;
  box-shadow:
    0 12px 25px rgba(0, 0, 0, 0.34),
    0 2px 0 #cbc7b8 inset;
  color: #182028;
  font-family: "Songti SC", "STSong", serif;
  font-size: 1.65rem;
  font-weight: 600;
  line-height: 1;
}

.mahjong-tile:nth-child(1) {
  transform: translateY(4px) rotate(-5deg);
}

.mahjong-tile:nth-child(2) {
  transform: translateY(-3px) rotate(1deg);
}

.mahjong-tile:nth-child(3) {
  transform: translateY(5px) rotate(4deg);
}

.mahjong-tile:nth-child(4) {
  transform: translateY(2px) rotate(9deg);
}

.mahjong-score {
  position: absolute;
  z-index: 4;
  top: 23px;
  right: 19px;
  color: #9cdcff;
  font-size: 2rem;
  font-weight: 500;
  letter-spacing: -0.07em;
  line-height: 1;
}

.mahjong-score small {
  display: block;
  margin-top: 3px;
  color: rgba(156, 220, 255, 0.55);
  font-family: var(--font-mono);
  font-size: 0.4rem;
  font-weight: 400;
  letter-spacing: 0.1em;
}

.mahjong-line {
  position: absolute;
  z-index: 2;
  bottom: 25px;
  left: 17px;
  color: rgba(156, 220, 255, 0.5);
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.08em;
}

/* Project artwork — Java */

.art--java {
  background:
    radial-gradient(circle at 80% 78%, rgba(255, 180, 92, 0.17), transparent 46%),
    linear-gradient(145deg, #19140e 0%, #0e0e10 78%);
}

.java-word {
  position: absolute;
  z-index: 1;
  right: -12px;
  bottom: -14px;
  color: transparent;
  font-size: 6.5rem;
  font-weight: 600;
  letter-spacing: -0.08em;
  line-height: 0.8;
  opacity: 0.35;
  -webkit-text-stroke: 1px rgba(255, 180, 92, 0.35);
}

.terminal {
  position: absolute;
  z-index: 3;
  top: 44px;
  right: 24px;
  bottom: 26px;
  left: 24px;
  overflow: hidden;
  border: 1px solid rgba(255, 180, 92, 0.28);
  border-radius: 7px;
  background: #0a0b0a;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.35);
  font-family: var(--font-mono);
  font-size: 0.45rem;
  line-height: 1.75;
}

.terminal__bar {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 9px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.4rem;
  letter-spacing: 0.05em;
}

.terminal__bar i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 180, 92, 0.5);
}

.terminal__body {
  padding: 10px 11px;
  color: #a6a99f;
  white-space: pre-wrap;
}

.terminal__body .kw {
  color: #ffb45c;
}

.terminal__body .str {
  color: #d8ff57;
}

.terminal__body .cm {
  color: #61675b;
}

.terminal__build {
  position: absolute;
  right: 10px;
  bottom: 8px;
  color: #8fdb90;
  font-size: 0.39rem;
  letter-spacing: 0.06em;
}

/* 7. About --------------------------------------------------------------- */

.about {
  position: relative;
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: var(--bg-soft);
}

.about::before {
  position: absolute;
  top: 12%;
  right: -8%;
  width: 35vw;
  height: 35vw;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    color-mix(in srgb, var(--accent) 5%, transparent),
    transparent 68%
  );
  content: "";
  pointer-events: none;
}

.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(40px, 7vw, 116px);
}

.about__lead {
  position: relative;
}

.about__title {
  margin-top: 24px;
  font-size: clamp(3rem, 5.7vw, 5.45rem);
  font-weight: 500;
  letter-spacing: -0.06em;
  line-height: 0.94;
}

.about__title span {
  display: block;
}

.about__title span:last-child {
  padding-left: clamp(0px, 3vw, 42px);
  color: var(--accent-text);
}

.about__kicker {
  max-width: 19em;
  margin-top: 29px;
  color: var(--muted);
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 1.9vw, 1.7rem);
  font-style: italic;
  line-height: 1.3;
}

.quote {
  position: relative;
  overflow: hidden;
  margin-top: clamp(36px, 5vw, 60px);
  padding: 27px 25px 24px 28px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent-text);
  border-radius: 0 18px 18px 0;
  background: var(--surface);
}

.quote::after {
  position: absolute;
  top: 18px;
  right: 20px;
  width: 30px;
  height: 30px;
  border-top: 1px solid var(--line-strong);
  border-right: 1px solid var(--line-strong);
  content: "";
  opacity: 0.7;
}

.quote p {
  position: relative;
  z-index: 1;
  max-width: 15em;
  font-family: var(--font-serif);
  font-size: clamp(1.55rem, 2.3vw, 2.15rem);
  font-style: italic;
  line-height: 1.1;
}

.quote cite {
  display: block;
  margin-top: 18px;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 0.55rem;
  font-style: normal;
  letter-spacing: 0.11em;
}

.about__body {
  padding-top: clamp(0px, 5vw, 72px);
}

.about__body > p {
  color: var(--muted);
  font-size: 0.97rem;
  line-height: 1.98;
}

.about__body > p + p {
  margin-top: 18px;
}

.about__body > p:first-child {
  color: var(--ink);
  font-size: clamp(1.15rem, 1.55vw, 1.38rem);
  line-height: 1.8;
  letter-spacing: -0.01em;
}

.focus {
  margin-top: clamp(34px, 4.5vw, 50px);
  border-top: 1px solid var(--line);
}

.focus__title {
  padding: 17px 0 13px;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 0.53rem;
  font-weight: 400;
  letter-spacing: 0.12em;
}

.focus__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 26px;
}

.focus__item {
  padding: 15px 0 17px;
  border-top: 1px solid var(--line);
}

.focus__item h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 500;
}

.focus__item h3::before {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent-text);
  content: "";
}

.focus__item p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.72;
}

.stack {
  margin-top: clamp(58px, 8vw, 92px);
  border-top: 1px solid var(--line);
}

.stack__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-top: 26px;
}

.stack__title {
  font-size: clamp(1.15rem, 1.7vw, 1.4rem);
  font-weight: 500;
  letter-spacing: -0.03em;
}

.stack__note {
  max-width: 28em;
  color: var(--muted);
  font-size: 0.8rem;
  text-align: right;
}

.stack__rows {
  margin-top: 22px;
}

.stack-row {
  display: grid;
  grid-template-columns: minmax(110px, 180px) minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.stack-row:last-child {
  border-bottom: 1px solid var(--line);
}

.stack-row__label {
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.12em;
}

.stack-row__items {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.chip {
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.61rem;
  line-height: 1;
  transition:
    background-color 0.25s ease,
    border-color 0.25s ease,
    color 0.25s ease,
    transform 0.3s var(--ease);
}

.chip:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-contrast);
  transform: translateY(-2px);
}

/* 8. Contact ------------------------------------------------------------- */

.contact {
  position: relative;
  background: var(--bg);
}

.contact__panel {
  position: relative;
  overflow: hidden;
  padding: clamp(32px, 5.5vw, 76px);
  border-radius: 30px;
  background: var(--accent);
  color: var(--accent-contrast);
  isolation: isolate;
}

.contact__panel::before {
  position: absolute;
  z-index: -1;
  top: -30%;
  right: -8%;
  width: 52%;
  aspect-ratio: 1;
  border: 1px solid rgba(10, 12, 6, 0.15);
  border-radius: 50%;
  box-shadow:
    0 0 0 45px rgba(10, 12, 6, 0.035),
    0 0 0 90px rgba(10, 12, 6, 0.025);
  content: "";
}

.contact__panel::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  background-image: radial-gradient(rgba(10, 12, 6, 0.13) 0.8px, transparent 0.8px);
  background-size: 17px 17px;
  content: "";
  mask-image: linear-gradient(90deg, transparent 35%, black);
  opacity: 0.48;
}

.contact__eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.14em;
  opacity: 0.62;
}

.contact__eyebrow::before {
  width: 20px;
  height: 1px;
  background: currentColor;
  content: "";
}

.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.55fr);
  gap: clamp(30px, 6vw, 90px);
  align-items: end;
  margin-top: 26px;
}

.contact__title {
  max-width: 11em;
  font-size: clamp(2.9rem, 6.2vw, 6.2rem);
  font-weight: 500;
  letter-spacing: -0.065em;
  line-height: 0.94;
}

.contact__title span {
  display: block;
}

.contact__aside {
  padding-bottom: 3px;
}

.contact__text {
  max-width: 28em;
  font-size: 0.91rem;
  line-height: 1.8;
  opacity: 0.76;
}

.contact__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 24px;
}

.contact__note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 17px;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.05em;
  line-height: 1.7;
}

.contact__note span:last-child {
  text-align: right;
}

/* 9. Footer -------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg);
}

.footer__inner {
  display: grid;
  width: min(100%, calc(var(--maxw) + var(--gutter) * 2));
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  margin-inline: auto;
  padding: 34px var(--gutter) 38px;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 13px;
}

.footer__mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 600;
}

.footer__brand p {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.55rem;
  line-height: 1.8;
  letter-spacing: 0.03em;
}

.footer__brand p:first-child {
  color: var(--ink);
  letter-spacing: 0.1em;
}

.footer__links {
  display: flex;
  align-items: center;
  gap: 23px;
}

.footer__links a {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.03em;
  transition: color 0.25s ease;
}

.footer__links a:hover {
  color: var(--accent-text);
}

.footer__right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
}

.footer__credit {
  max-width: 25em;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 0.55rem;
  line-height: 1.7;
  text-align: right;
}

.back-to-top {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  transition:
    background-color 0.25s ease,
    border-color 0.25s ease,
    color 0.25s ease;
}

.back-to-top:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-contrast);
}

.back-to-top svg {
  width: 14px;
  height: 14px;
}

.footer__bottom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  width: min(100%, calc(var(--maxw) + var(--gutter) * 2));
  margin-inline: auto;
  padding: 0 var(--gutter) 22px;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
}

.footer__bottom > span:first-child {
  grid-column: 1;
  justify-self: start;
}

.footer__bottom > span:last-child {
  grid-column: 3;
  justify-self: end;
  text-align: right;
}

.footer__filing-list {
  display: flex;
  grid-column: 2;
  flex-wrap: wrap;
  justify-content: center;
  justify-self: center;
  gap: 6px;
}

.footer__filing {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 0.52rem;
  letter-spacing: 0.04em;
  line-height: 1.5;
  transition:
    border-color 0.25s ease,
    color 0.25s ease;
}

.footer__filing span {
  color: var(--muted);
}

.footer__filing b {
  color: var(--ink);
  font-weight: 400;
}

a.footer__filing:hover {
  border-color: var(--accent-text);
  color: var(--accent-text);
}

/* Toast */

.toast {
  position: fixed;
  z-index: 450;
  right: 20px;
  bottom: 20px;
  max-width: calc(100vw - 40px);
  padding: 12px 17px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface-raised);
  box-shadow: var(--shadow-soft);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition:
    opacity 0.3s ease,
    transform 0.3s var(--ease);
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* No-script */

.noscript {
  max-width: 760px;
  margin: 0 auto;
  padding: 140px var(--gutter) 80px;
}

.noscript h1 {
  margin: 20px 0 22px;
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 500;
  letter-spacing: -0.06em;
  line-height: 0.9;
}

.noscript h1 span {
  color: var(--accent-text);
}

.noscript > p {
  max-width: 36em;
  color: var(--muted);
  line-height: 1.9;
}

.noscript ul {
  display: grid;
  gap: 14px;
  margin: 28px 0;
}

.noscript li a {
  color: var(--ink);
  border-bottom: 1px solid var(--line-strong);
}

.noscript__note {
  margin-top: 32px;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 0.62rem;
}

/* 10. Motion ------------------------------------------------------------- */

@keyframes orbit-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes chip-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-9px);
  }
}

@keyframes ticker-marquee {
  to {
    transform: translateX(-50%);
  }
}

.has-reveal .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.85s var(--ease),
    transform 0.85s var(--ease);
  transition-delay: var(--delay, 0s);
  will-change: opacity, transform;
}

.has-reveal .reveal.is-visible {
  opacity: 1;
  transform: none;
}

.is-ready .hero__eyebrow,
.is-ready .hero__title,
.is-ready .hero__alias,
.is-ready .hero__intro,
.is-ready .hero__intro-en,
.is-ready .hero__actions,
.is-ready .hero__visual,
.is-ready .hero__stats {
  animation: hero-enter 1s var(--ease) both;
}

.is-ready .hero__title {
  animation-delay: 0.05s;
}

.is-ready .hero__alias {
  animation-delay: 0.15s;
}

.is-ready .hero__intro {
  animation-delay: 0.23s;
}

.is-ready .hero__intro-en {
  animation-delay: 0.3s;
}

.is-ready .hero__actions {
  animation-delay: 0.36s;
}

.is-ready .hero__visual {
  animation-delay: 0.2s;
}

.is-ready .hero__stats {
  animation-delay: 0.45s;
}

@keyframes hero-enter {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* 11. Responsive --------------------------------------------------------- */

@media (max-width: 1180px) {
  .hero__inner {
    grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.7fr);
  }

  .hero__title {
    font-size: clamp(4rem, 9.5vw, 8rem);
  }

  .hero__visual {
    min-height: 500px;
  }

  .id-card {
    width: min(100%, 320px);
  }

  .project--featured {
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  }

  .project__visual {
    padding-right: 28px;
  }
}

@media (max-width: 1020px) {
  .site-nav {
    display: none;
  }

  .menu-btn {
    display: inline-flex;
  }

  .header__github {
    display: none;
  }

  .hero {
    min-height: auto;
  }

  .hero__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
    padding-top: 22px;
  }

  .hero__copy {
    padding-bottom: 22px;
  }

  .hero__title {
    font-size: clamp(4rem, 12.6vw, 8.2rem);
  }

  .hero__visual {
    width: min(100%, 520px);
    min-height: 470px;
    margin: 14px auto 38px;
  }

  .hero__stats {
    margin-top: 0;
  }

  .project--featured {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }

  .project__visual {
    order: -1;
    padding: 30px 30px 0;
  }

  .app-window {
    transform: perspective(1400px) rotateY(-2.5deg) rotateX(1deg);
  }

  .project__body {
    padding-top: 32px;
  }

  .project__title {
    margin-top: 26px;
  }

  .project__desc {
    max-width: 42em;
  }

  .project__footer {
    margin-top: 28px;
  }

  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-card:last-child:nth-child(odd) {
    grid-column: span 2;
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    min-height: 0;
  }

  .project-card:last-child:nth-child(odd) .project-card__art {
    height: 100%;
    min-height: 290px;
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }

  .project-card:last-child:nth-child(odd) .project-card__body {
    min-height: 290px;
  }

  .about__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .about__body {
    padding-top: 28px;
  }

  .about__kicker {
    max-width: 24em;
  }

  .quote {
    max-width: 560px;
  }

  .contact__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .footer__inner {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .footer__links {
    grid-row: 2;
    grid-column: 1 / -1;
    padding-top: 16px;
    border-top: 1px solid var(--line);
  }

  .footer__right {
    grid-column: 2;
    grid-row: 1;
  }
}

@media (max-width: 820px) {
  :root {
    --header-h: 70px;
  }

  .section-head {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .section-head__aside {
    max-width: 34em;
  }

  .section-head__title span:last-child {
    padding-left: 0;
  }

  .hero__title {
    font-size: clamp(3.6rem, 13vw, 7rem);
  }

  .hero__title-line--bottom {
    padding-left: clamp(0px, 8vw, 60px);
  }

  .hero__stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat:nth-child(3) {
    border-left: 0;
  }

  .stat:nth-child(n + 3) {
    border-top: 0;
  }

  .stat:nth-child(even) {
    padding-left: 20px;
    border-left: 1px solid var(--line);
  }

  .stat:nth-child(odd) {
    padding-left: 0;
  }

  .project-card {
    min-height: 470px;
  }

  .focus__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .focus__item:nth-child(2) {
    border-top: 0;
    padding-top: 0;
  }

  .stack__head {
    display: block;
  }

  .stack__note {
    margin-top: 8px;
    text-align: left;
  }

  .stack-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .contact__title {
    font-size: clamp(2.8rem, 9vw, 4.6rem);
  }

  .contact__note {
    display: block;
  }

  .contact__note span:last-child {
    display: block;
    margin-top: 5px;
    text-align: left;
  }
}

@media (max-width: 640px) {
  :root {
    --radius: 21px;
    --gutter: 20px;
  }

  .page-grain {
    display: none;
  }

  .brand__word {
    display: none;
  }

  .header__actions {
    gap: 7px;
  }

  .hero {
    padding-top: calc(var(--header-h) + 38px);
  }

  .hero::after {
    right: -0.2em;
    bottom: 12%;
    font-size: 17rem;
  }

  .hero__title {
    font-size: clamp(3.25rem, 15.4vw, 5.3rem);
    letter-spacing: -0.065em;
  }

  .hero__title-line--bottom {
    padding-left: 0.4em;
  }

  .hero__alias {
    margin-top: 18px;
    font-size: 0.58rem;
  }

  .hero__intro {
    margin-top: 22px;
    font-size: 0.95rem;
    line-height: 1.9;
  }

  .hero__actions {
    display: grid;
    grid-template-columns: 1fr;
    margin-top: 26px;
  }

  .hero__actions .btn {
    width: 100%;
  }

  .hero__visual {
    min-height: 405px;
    margin-bottom: 25px;
  }

  .id-card {
    width: min(100%, 292px);
  }

  .id-card__name {
    font-size: 1.55rem;
  }

  .portrait-orbit {
    width: 112%;
  }

  .portrait-sticker {
    top: 6%;
    right: 0;
  }

  .portrait-chip--one {
    top: 12%;
    left: -2px;
  }

  .stat {
    padding-block: 17px;
  }

  .stat__value {
    font-size: 1.7rem;
  }

  .stat__label {
    font-size: 0.67rem;
  }

  .stat__note {
    font-size: 0.58rem;
  }

  .section {
    padding-block: 78px;
  }

  .section-head__title {
    font-size: clamp(2.8rem, 12vw, 4rem);
  }

  .project__visual {
    padding: 22px 20px 0;
  }

  .app-window {
    transform: none;
  }

  .visual-chip {
    right: 12px;
    bottom: 10px;
    font-size: 0.39rem;
  }

  .project__body {
    padding: 26px 21px 22px;
  }

  .project__title {
    font-size: clamp(2.1rem, 9.2vw, 2.75rem);
  }

  .project__tagline {
    font-size: 0.94rem;
  }

  .project__desc {
    font-size: 0.82rem;
  }

  .project-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .project-card,
  .project-card:last-child,
  .project-card:last-child:nth-child(odd) {
    display: flex;
    grid-column: auto;
    min-height: 0;
  }

  .project-card__art,
  .project-card:last-child .project-card__art,
  .project-card:last-child:nth-child(odd) .project-card__art {
    height: 205px;
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .project-card:last-child .project-card__body,
  .project-card:last-child:nth-child(odd) .project-card__body {
    min-height: 0;
  }

  .project-card__body {
    padding: 20px;
  }

  .about__title {
    font-size: clamp(2.8rem, 12vw, 4rem);
  }

  .about__kicker {
    font-size: 1.3rem;
  }

  .quote {
    padding: 24px 20px 22px;
  }

  .quote p {
    font-size: 1.6rem;
  }

  .about__body > p {
    font-size: 0.92rem;
  }

  .about__body > p:first-child {
    font-size: 1.08rem;
  }

  .focus__item:nth-child(2) {
    border-top: 1px solid var(--line);
    padding-top: 15px;
  }

  .contact__panel {
    padding: 30px 23px 34px;
    border-radius: 22px;
  }

  .contact__title {
    font-size: clamp(1.7rem, 8.4vw, 3.4rem);
  }

  .contact__text {
    font-size: 0.86rem;
  }

  .contact__actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .contact__actions .btn {
    width: 100%;
  }

  .footer__inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 22px;
    padding-block: 28px;
  }

  .footer__links {
    width: 100%;
    padding-top: 14px;
  }

  .footer__right {
    width: 100%;
    align-items: flex-start;
    justify-content: space-between;
  }

  .footer__credit {
    text-align: left;
  }

  .footer__bottom {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .mobile-nav__foot {
    display: block;
  }

  .mobile-nav__foot a {
    display: inline-block;
    margin-top: 9px;
    text-align: left;
  }
}

@media (max-width: 380px) {
  .hero__title {
    font-size: 3rem;
  }

  .portrait-sticker {
    padding: 7px 8px;
    font-size: 0.56rem;
  }

  .portrait-chip {
    display: none;
  }
}

/* 12. Preferences / fallbacks ------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .has-reveal .reveal {
    opacity: 1;
    transform: none;
  }

  .ticker__track {
    animation: none;
  }
}

@media (prefers-contrast: more) {
  :root {
    --line: rgba(242, 240, 233, 0.28);
    --line-strong: rgba(242, 240, 233, 0.5);
    --muted: #c8c6d0;
  }

  [data-theme="light"] {
    --line: rgba(18, 19, 15, 0.3);
    --line-strong: rgba(18, 19, 15, 0.48);
    --muted: #3f4139;
  }
}

@media print {
  .site-header,
  .mobile-nav,
  .page-grain,
  .scroll-progress,
  .hero__visual,
  .ticker,
  .toast {
    display: none !important;
  }

  body {
    background: #fff;
    color: #111;
  }

  .hero {
    min-height: 0;
    padding-top: 30px;
  }

  .project-card,
  .project--featured,
  .contact__panel {
    break-inside: avoid;
    box-shadow: none;
  }
}

