/* =========================================================
   杜雨椿 · 个人主页
   Editorial / warm paper / deep green / persimmon
   ========================================================= */

:root {
  --paper: #f3eee4;
  --paper-light: #fbf8f1;
  --paper-deep: #e8dfd0;
  --ink: #1c2721;
  --ink-soft: #3e4a43;
  --muted: #777b70;
  --green: #22392e;
  --green-deep: #16261e;
  --green-soft: #314b3d;
  --terracotta: #b9553d;
  --terracotta-soft: #d07a62;
  --gold: #c8ad7b;
  --line: rgba(34, 57, 46, 0.16);
  --line-strong: rgba(34, 57, 46, 0.3);
  --cream: #f4eee1;
  --serif: "Iowan Old Style", "Baskerville", "Times New Roman", "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "SimSun", serif;
  --sans: "Helvetica Neue", "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --wrap: 1440px;
  --gutter: clamp(22px, 5vw, 80px);
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.8;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.nav-open {
  overflow: hidden;
}

::selection {
  background: var(--terracotta);
  color: var(--cream);
}

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

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
}

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

h1,
h2,
h3 {
  font-weight: 500;
  text-wrap: balance;
}

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

:focus-visible {
  outline: 2px solid var(--terracotta);
  outline-offset: 5px;
}

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

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

::-webkit-scrollbar-thumb {
  background: var(--green-soft);
  border: 3px solid var(--paper);
  border-radius: 99px;
}

.wrap {
  width: min(100%, var(--wrap));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  padding: 10px 18px;
  background: var(--green);
  color: var(--cream);
  text-decoration: none;
  font-size: 13px;
  transform: translateY(-140%);
  transition: transform 0.25s var(--ease);
}

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

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

.scroll-progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 120;
  height: 2px;
  pointer-events: none;
}

.scroll-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--terracotta);
  transform: scaleX(0);
  transform-origin: 0 50%;
  will-change: transform;
}

/* Loader ----------------------------------------------------- */
.loader {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  place-items: center;
  background: var(--green-deep);
  color: var(--cream);
  transition: opacity 0.9s var(--ease), visibility 0.9s;
}

.loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}

.loader-mark {
  font-family: var(--serif);
  font-size: clamp(68px, 9vw, 110px);
  line-height: 1;
  color: var(--cream);
  animation: loaderBreathe 1.8s ease-in-out infinite;
}

.loader-line {
  position: relative;
  display: block;
  width: min(220px, 44vw);
  height: 1px;
  overflow: hidden;
  background: rgba(244, 238, 225, 0.18);
}

.loader-line i {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: 0 50%;
  animation: loaderLine 1.15s 0.1s var(--ease) forwards;
}

.loader-copy {
  font-size: 9px;
  letter-spacing: 0.42em;
  color: rgba(244, 238, 225, 0.55);
}

@keyframes loaderBreathe {
  0%, 100% { opacity: 0.82; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.04); }
}

@keyframes loaderLine {
  to { transform: scaleX(1); }
}

/* Header ----------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 110;
  padding-block: 20px;
  transition: padding 0.4s var(--ease), background-color 0.4s var(--ease),
    box-shadow 0.4s var(--ease);
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(243, 238, 228, 0.86);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}

.site-header.scrolled {
  padding-block: 12px;
}

.site-header.scrolled::before {
  opacity: 1;
  border-bottom-color: var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  flex-shrink: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 20px;
  color: var(--green);
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease),
    border-color 0.35s var(--ease), transform 0.5s var(--ease);
}

.brand:hover .brand-mark {
  background: var(--green);
  border-color: var(--green);
  color: var(--cream);
  transform: rotate(-8deg);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-copy strong {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.brand-copy small {
  margin-top: 6px;
  font-size: 7px;
  letter-spacing: 0.28em;
  color: var(--muted);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: clamp(24px, 3vw, 48px);
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  padding-block: 6px;
  color: var(--ink-soft);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: color 0.25s ease;
}

.nav-link span {
  font-family: var(--serif);
  font-size: 9px;
  font-style: italic;
  color: var(--terracotta);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--terracotta);
  transform: scaleX(0);
  transform-origin: 100% 50%;
  transition: transform 0.4s var(--ease);
}

.nav-link:hover,
.nav-link[aria-current="true"] {
  color: var(--ink);
}

.nav-link:hover::after,
.nav-link[aria-current="true"]::after {
  transform: scaleX(1);
  transform-origin: 0 50%;
}

.header-side {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-shrink: 0;
}

.header-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--muted);
  white-space: nowrap;
}

.header-status i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--terracotta);
  box-shadow: 0 0 0 4px rgba(185, 85, 61, 0.12);
  animation: statusPulse 2.6s ease-in-out infinite;
}

@keyframes statusPulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(185, 85, 61, 0.1); }
  50% { box-shadow: 0 0 0 6px rgba(185, 85, 61, 0.03); }
}

.menu-btn {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  z-index: 130;
  transition: border-color 0.3s ease, background-color 0.3s ease;
}

.menu-btn span {
  position: absolute;
  left: 50%;
  width: 17px;
  height: 1px;
  background: var(--ink);
  transform: translateX(-50%);
  transition: transform 0.4s var(--ease), background-color 0.3s ease, top 0.3s ease;
}

.menu-btn span:first-child { top: 18px; }
.menu-btn span:last-child { top: 24px; width: 11px; left: calc(50% - 3px); }

.nav-open .menu-btn span {
  background: var(--cream);
}

.nav-open .menu-btn span:first-child {
  top: 21px;
  transform: translateX(-50%) rotate(45deg);
}

.nav-open .menu-btn span:last-child {
  top: 21px;
  width: 17px;
  left: 50%;
  transform: translateX(-50%) rotate(-45deg);
}

/* Hero ------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: clamp(130px, 15vh, 190px) 0 clamp(90px, 11vh, 130px);
  overflow: hidden;
  background:
    radial-gradient(circle at 77% 32%, rgba(200, 173, 123, 0.18), transparent 28%),
    radial-gradient(circle at 10% 80%, rgba(185, 85, 61, 0.07), transparent 25%),
    var(--paper);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent 49.94%, rgba(34, 57, 46, 0.06) 50%, transparent 50.06%);
  opacity: 0.8;
}

.hero-atmosphere {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.rain {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0.65;
}

.rain i {
  position: absolute;
  top: -18vh;
  width: 1px;
  height: 80px;
  background: linear-gradient(to bottom, transparent, rgba(34, 57, 46, 0.22));
  transform: rotate(8deg);
  animation: rainFall linear infinite;
}

@keyframes rainFall {
  from { transform: translate3d(0, -20vh, 0) rotate(8deg); }
  to { transform: translate3d(-14px, 125vh, 0) rotate(8deg); }
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(1px);
}

.orb-one {
  top: 16%;
  right: 3%;
  width: clamp(200px, 30vw, 460px);
  height: clamp(200px, 30vw, 460px);
  background: radial-gradient(circle at 36% 32%, rgba(200, 173, 123, 0.3), rgba(200, 173, 123, 0.02) 62%);
  animation: orbFloat 12s ease-in-out infinite;
}

.orb-two {
  bottom: 4%;
  left: 3%;
  width: clamp(110px, 16vw, 240px);
  height: clamp(110px, 16vw, 240px);
  background: radial-gradient(circle, rgba(185, 85, 61, 0.1), transparent 68%);
  animation: orbFloat 9s 1.5s ease-in-out infinite reverse;
}

@keyframes orbFloat {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(-16px, 20px, 0); }
}

.hero-kanji {
  position: absolute;
  right: -5vw;
  bottom: -13vw;
  font-family: var(--serif);
  font-size: clamp(320px, 46vw, 760px);
  line-height: 0.8;
  color: rgba(185, 85, 61, 0.055);
  user-select: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(20px, 4vw, 68px);
}

.hero-copy {
  position: relative;
  z-index: 3;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 9px;
  letter-spacing: 0.28em;
  color: var(--muted);
}

.hero-eyebrow b {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--terracotta);
  font-weight: 500;
}

.hero-eyebrow b::before {
  content: "";
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--terracotta);
}

.eyebrow-rule {
  width: 36px;
  height: 1px;
  background: var(--line-strong);
}

.hero-title {
  margin: 30px 0 24px;
  color: var(--green-deep);
}

.title-chars {
  display: flex;
  font-family: var(--serif);
  font-size: clamp(82px, 10.6vw, 158px);
  font-weight: 500;
  line-height: 0.94;
  letter-spacing: -0.06em;
}

.char {
  display: inline-block;
}

.char-outline {
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(34, 57, 46, 0.72);
  transform: translateY(-0.04em);
}

.title-en {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
  font-size: 8px;
  letter-spacing: 0.4em;
  color: var(--muted);
}

.title-en i {
  display: block;
  width: 56px;
  height: 1px;
  background: var(--line-strong);
}

.hero-tagline {
  margin-top: 6px;
  font-family: var(--serif);
  font-size: clamp(25px, 2.4vw, 34px);
  line-height: 1.45;
  letter-spacing: 0.05em;
  color: var(--ink);
}

.hero-desc {
  max-width: 480px;
  margin-top: 20px;
  color: var(--muted);
  font-size: 14px;
  line-height: 2;
  letter-spacing: 0.02em;
}

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

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  min-height: 52px;
  padding: 0 25px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-decoration: none;
  overflow: hidden;
  transition: color 0.35s var(--ease), border-color 0.35s var(--ease);
}

.btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.35s var(--ease);
}

.btn-solid {
  background: var(--green);
  color: var(--cream);
  border: 1px solid var(--green);
}

.btn-solid::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--terracotta);
  transform: translateY(101%);
  transition: transform 0.4s var(--ease);
}

.btn-solid span,
.btn-solid svg {
  position: relative;
  z-index: 1;
}

.btn-solid:hover {
  border-color: var(--terracotta);
}

.btn-solid:hover::before {
  transform: translateY(0);
}

.btn:hover svg {
  transform: translateX(4px);
}

.btn-line {
  border: 1px solid var(--line-strong);
  color: var(--ink);
}

.btn-line em {
  font-family: var(--serif);
  font-style: normal;
  font-size: 10px;
  color: var(--terracotta);
}

.btn-line:hover {
  border-color: var(--green);
  color: var(--terracotta);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  margin-top: 44px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  max-width: 510px;
}

.hero-meta li {
  font-family: var(--serif);
  font-size: 15px;
  color: var(--ink-soft);
}

.hero-meta li span {
  display: block;
  margin-bottom: 2px;
  font-family: var(--sans);
  font-size: 8px;
  letter-spacing: 0.22em;
  color: var(--muted);
}

/* Hero portrait */
.hero-visual {
  position: relative;
  min-width: 0;
  perspective: 1100px;
}

.orbit-wrap {
  position: relative;
  width: min(100%, 570px);
  aspect-ratio: 1;
  margin-inline: auto;
}

.orbit-text {
  position: absolute;
  inset: 1%;
  width: 98%;
  height: 98%;
  overflow: visible;
  color: rgba(34, 57, 46, 0.38);
  animation: orbitSpin 52s linear infinite;
}

.orbit-text text {
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.24em;
}

@keyframes orbitSpin {
  to { transform: rotate(360deg); }
}

.portrait-float {
  position: absolute;
  top: 11%;
  left: 15%;
  width: 70%;
  animation: cardFloat 7s ease-in-out infinite;
  transform-style: preserve-3d;
}

@keyframes cardFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-11px); }
}

.portrait-card {
  position: relative;
  background: var(--paper-light);
  padding: 14px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.85) inset,
    0 30px 70px -32px rgba(22, 38, 30, 0.45),
    0 2px 0 rgba(34, 57, 46, 0.08);
  transform-style: preserve-3d;
  will-change: transform;
}

.portrait-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 2px 11px;
  font-size: 6.5px;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.portrait-art {
  position: relative;
  aspect-ratio: 0.82;
  overflow: hidden;
  background:
    radial-gradient(circle at 74% 21%, rgba(200, 173, 123, 0.3) 0 15%, transparent 15.4%),
    linear-gradient(155deg, #3a5646 0%, #22392e 52%, #16261e 100%);
  color: rgba(244, 238, 225, 0.68);
}

.portrait-art::before {
  content: "";
  position: absolute;
  inset: 0;
  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='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.22'/%3E%3C/svg%3E");
  opacity: 0.35;
  mix-blend-mode: soft-light;
}

.art-sun {
  position: absolute;
  top: 16%;
  right: 16%;
  width: 17%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--terracotta);
  opacity: 0.88;
  box-shadow: 0 0 55px rgba(185, 85, 61, 0.25);
}

.art-ring {
  position: absolute;
  border: 1px solid rgba(200, 173, 123, 0.32);
  border-radius: 50%;
}

.art-ring-one {
  top: 5%;
  right: 4%;
  width: 48%;
  aspect-ratio: 1;
}

.art-ring-two {
  top: 1%;
  right: 0;
  width: 58%;
  aspect-ratio: 1;
  border-style: dashed;
  opacity: 0.5;
}

.art-vertical {
  position: absolute;
  top: 8%;
  left: 9%;
  writing-mode: vertical-rl;
  font-family: var(--serif);
  font-size: clamp(9px, 0.9vw, 13px);
  letter-spacing: 0.36em;
  color: rgba(200, 173, 123, 0.8);
}

.art-glyph {
  position: absolute;
  top: 48%;
  left: 50%;
  font-family: var(--serif);
  font-size: clamp(95px, 11vw, 170px);
  line-height: 1;
  color: rgba(244, 238, 225, 0.11);
  transform: translate(-50%, -50%);
  user-select: none;
}

.botanical {
  position: absolute;
  left: 13%;
  bottom: -1%;
  width: 66%;
  color: rgba(244, 238, 225, 0.48);
}

.portrait-seal {
  position: absolute;
  right: 10%;
  bottom: 7%;
  display: grid;
  place-items: center;
  width: 38px;
  height: 54px;
  border: 1px solid rgba(200, 173, 123, 0.58);
  color: var(--gold);
  font-family: var(--serif);
  font-size: 13px;
  line-height: 1;
  letter-spacing: 0.08em;
}

.portrait-seal span {
  display: block;
}

.portrait-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 2px 4px;
}

.portrait-name {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.portrait-name strong {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.portrait-name span {
  margin-top: 7px;
  font-size: 6.5px;
  letter-spacing: 0.3em;
  color: var(--muted);
}

.portrait-facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.portrait-facts span {
  padding: 2px 6px;
  border: 1px solid var(--line);
  font-size: 7px;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  white-space: nowrap;
}

.card-corner {
  position: absolute;
  width: 12px;
  height: 12px;
  pointer-events: none;
}

.corner-tl {
  top: 5px;
  left: 5px;
  border-top: 1px solid var(--line-strong);
  border-left: 1px solid var(--line-strong);
}

.corner-br {
  bottom: 5px;
  right: 5px;
  border-bottom: 1px solid var(--line-strong);
  border-right: 1px solid var(--line-strong);
}

.float-tag {
  position: absolute;
  z-index: 3;
  padding: 8px 13px;
  background: rgba(251, 248, 241, 0.88);
  border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-size: 8px;
  letter-spacing: 0.13em;
  color: var(--ink-soft);
  white-space: nowrap;
  box-shadow: 0 10px 30px -20px rgba(22, 38, 30, 0.4);
}

.tag-one {
  top: 14%;
  left: 2%;
  animation: tagFloat 6s 0.4s ease-in-out infinite;
}

.tag-two {
  right: 1%;
  bottom: 19%;
  animation: tagFloat 7s 1.1s ease-in-out infinite reverse;
}

@keyframes tagFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

.hero-coordinate {
  position: absolute;
  left: 2%;
  bottom: 7%;
  font-size: 7px;
  letter-spacing: 0.2em;
  color: var(--muted);
  writing-mode: vertical-rl;
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 26px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  text-decoration: none;
  transform: translateX(-50%);
  transition: color 0.3s ease;
}

.scroll-cue span {
  font-size: 7px;
  letter-spacing: 0.32em;
  white-space: nowrap;
}

.scroll-cue i {
  position: relative;
  display: block;
  width: 1px;
  height: 42px;
  overflow: hidden;
  background: var(--line);
}

.scroll-cue i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--terracotta);
  animation: scrollCue 2.2s ease-in-out infinite;
}

.scroll-cue:hover {
  color: var(--terracotta);
}

@keyframes scrollCue {
  0% { transform: translateY(-100%); }
  55%, 100% { transform: translateY(100%); }
}

/* Loaded animation */
.js .hero-copy > *,
.js .hero-visual,
.js .scroll-cue {
  opacity: 0;
  transform: translateY(26px);
}

body.is-loaded .hero-copy > *,
body.is-loaded .hero-visual,
body.is-loaded .scroll-cue {
  animation: riseIn 1s var(--ease) forwards;
}

body.is-loaded .hero-copy > :nth-child(1) { animation-delay: 0.15s; }
body.is-loaded .hero-copy > :nth-child(2) { animation-delay: 0.23s; }
body.is-loaded .hero-copy > :nth-child(3) { animation-delay: 0.31s; }
body.is-loaded .hero-copy > :nth-child(4) { animation-delay: 0.39s; }
body.is-loaded .hero-copy > :nth-child(5) { animation-delay: 0.47s; }
body.is-loaded .hero-copy > :nth-child(6) { animation-delay: 0.55s; }
body.is-loaded .hero-copy > :nth-child(7) { animation-delay: 0.63s; }
body.is-loaded .hero-visual { animation-delay: 0.35s; }
body.is-loaded .scroll-cue { animation-delay: 1s; }

@keyframes riseIn {
  to { opacity: 1; transform: translateY(0); }
}

/* Marquee --------------------------------------------------- */
.marquee-band {
  position: relative;
  z-index: 3;
  overflow: hidden;
  background: var(--green);
  color: var(--cream);
  border-block: 1px solid rgba(200, 173, 123, 0.18);
}

.marquee {
  overflow: hidden;
  padding-block: 15px;
}

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

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

.marquee-group {
  display: flex;
  align-items: center;
  gap: 34px;
  padding-right: 34px;
}

.marquee-group span {
  font-family: var(--serif);
  font-size: clamp(14px, 1.2vw, 18px);
  letter-spacing: 0.18em;
  white-space: nowrap;
}

.marquee-group i {
  font-style: normal;
  font-size: 8px;
  color: var(--gold);
}

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

/* Sections -------------------------------------------------- */
.section {
  position: relative;
  padding-block: clamp(94px, 11vw, 160px);
}

.section-head {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 24px);
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.section-no {
  font-family: var(--serif);
  font-size: 12px;
  font-style: italic;
  color: var(--terracotta);
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 8px;
  letter-spacing: 0.26em;
  color: var(--muted);
  white-space: nowrap;
}

.section-label b {
  font-family: var(--serif);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--ink);
}

.section-rule {
  flex: 1;
  height: 1px;
  background: var(--line);
}

.section-side {
  font-size: 7px;
  letter-spacing: 0.25em;
  color: var(--muted);
  white-space: nowrap;
}

.reveal {
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

.js .reveal {
  opacity: 0;
  transform: translateY(34px);
}

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

/* About ----------------------------------------------------- */
.about {
  overflow: hidden;
}

.about::before {
  content: "ABOUT";
  position: absolute;
  top: 13%;
  right: -2%;
  font-family: var(--serif);
  font-size: clamp(120px, 18vw, 280px);
  line-height: 1;
  letter-spacing: 0.04em;
  color: rgba(34, 57, 46, 0.035);
  pointer-events: none;
}

.about-title {
  margin: clamp(42px, 6vw, 76px) 0 clamp(56px, 8vw, 100px);
  font-family: var(--serif);
  font-size: clamp(46px, 6.6vw, 94px);
  line-height: 1.16;
  letter-spacing: -0.02em;
  color: var(--green-deep);
}

.about-title em,
.abilities-intro h2 em,
.reading-copy h2 em,
.work-heading-row h2 em,
.outro h2 em {
  font-style: normal;
  color: var(--terracotta);
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(50px, 8vw, 130px);
  align-items: start;
}

.about-aside {
  position: sticky;
  top: 130px;
}

.about-emblem {
  position: relative;
  width: clamp(185px, 19vw, 250px);
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.emblem-orbit {
  position: absolute;
  inset: 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 50%;
  animation: orbitSpin 36s linear infinite;
}

.emblem-char {
  font-family: var(--serif);
  font-size: clamp(62px, 6vw, 84px);
  color: var(--green);
}

.emblem-small {
  position: absolute;
  right: -10px;
  bottom: 24px;
  padding: 4px 0 4px 9px;
  background: var(--paper);
  border-left: 1px solid var(--terracotta);
  font-size: 6.5px;
  line-height: 1.55;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.emblem-dot {
  position: absolute;
  top: 20%;
  left: 12%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--terracotta);
}

.about-quote {
  margin-top: 44px;
  padding-left: 23px;
  border-left: 1px solid var(--terracotta);
}

.quote-mark {
  display: block;
  height: 24px;
  font-family: var(--serif);
  font-size: 42px;
  line-height: 1;
  color: var(--terracotta);
}

.about-quote blockquote {
  margin-top: 10px;
  font-family: var(--serif);
  font-size: clamp(17px, 1.5vw, 21px);
  line-height: 1.8;
  color: var(--ink-soft);
}

.about-quote figcaption {
  margin-top: 12px;
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.about-coordinate {
  margin-top: 50px;
  font-size: 7px;
  line-height: 1.8;
  letter-spacing: 0.24em;
  color: var(--muted);
}

.about-coordinate span {
  color: rgba(119, 123, 112, 0.65);
}

.about-copy {
  padding-top: 8px;
}

.about-lead {
  margin-bottom: 26px;
  font-family: var(--serif);
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1.65;
  letter-spacing: 0.02em;
  color: var(--green-deep);
}

.about-copy > p:not(.about-lead) {
  max-width: 650px;
  margin-bottom: 18px;
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 2.1;
  text-align: justify;
}

.facts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 42px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.facts-grid > div {
  padding: 20px 24px 22px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.facts-grid dt {
  margin-bottom: 5px;
  font-size: 7.5px;
  letter-spacing: 0.19em;
  color: var(--muted);
}

.facts-grid dd {
  font-family: var(--serif);
  font-size: clamp(18px, 1.5vw, 22px);
  letter-spacing: 0.06em;
  color: var(--ink);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 24px;
  margin-top: 34px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--line-strong);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.text-link-arrow {
  display: inline-block;
  font-size: 15px;
  color: var(--terracotta);
  transition: transform 0.35s var(--ease);
}

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

.text-link:hover .text-link-arrow {
  transform: translate(4px, -4px);
}

/* Abilities ------------------------------------------------- */
.abilities {
  background: var(--paper-deep);
  overflow: hidden;
}

.abilities::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(34, 57, 46, 0.035) 1px, transparent 1px);
  background-size: 100% 72px;
  opacity: 0.6;
}

.abilities .wrap {
  position: relative;
  z-index: 1;
}

.abilities-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
  gap: 50px;
  align-items: end;
  margin: clamp(46px, 6vw, 76px) 0 clamp(50px, 6vw, 78px);
}

.abilities-intro h2 {
  font-family: var(--serif);
  font-size: clamp(46px, 6vw, 84px);
  line-height: 1.16;
  letter-spacing: -0.02em;
  color: var(--green-deep);
}

.abilities-intro-copy {
  max-width: 430px;
  padding-bottom: 8px;
}

.abilities-intro-copy p {
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 2;
}

.mini-sign {
  display: inline-block;
  margin-top: 20px;
  font-size: 7.5px;
  letter-spacing: 0.24em;
  color: var(--muted);
}

.ability-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.ability-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 320px;
  padding: clamp(26px, 3vw, 42px);
  background: var(--paper-light);
  overflow: hidden;
  transition: background-color 0.5s var(--ease), color 0.5s var(--ease);
}

.ability-wide {
  grid-column: span 2;
  min-height: 300px;
}

.ability-card::after {
  content: "";
  position: absolute;
  top: -35%;
  right: -20%;
  width: 55%;
  aspect-ratio: 1;
  border: 1px solid rgba(200, 173, 123, 0.28);
  border-radius: 50%;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.6s var(--ease), transform 0.8s var(--ease);
}

.ability-card:hover {
  background: var(--green);
  color: var(--cream);
}

.ability-card:hover::after {
  opacity: 1;
  transform: scale(1);
}

.ability-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.ability-no {
  font-family: var(--serif);
  font-size: 10px;
  font-style: italic;
  color: var(--terracotta);
  transition: color 0.4s ease;
}

.ability-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--green);
  transition: border-color 0.4s ease, color 0.4s ease, transform 0.5s var(--ease);
}

.ability-icon svg {
  width: 27px;
  height: 27px;
  stroke: currentColor;
  stroke-width: 1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ability-card:hover .ability-icon {
  border-color: rgba(200, 173, 123, 0.5);
  color: var(--gold);
  transform: rotate(-6deg);
}

.ability-card:hover .ability-no {
  color: var(--gold);
}

.ability-body {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding-top: 38px;
}

.ability-body h3 {
  font-family: var(--serif);
  font-size: clamp(24px, 2.5vw, 34px);
  letter-spacing: 0.06em;
  color: var(--green-deep);
  transition: color 0.4s ease;
}

.ability-card:hover .ability-body h3 {
  color: var(--cream);
}

.ability-body p {
  max-width: 560px;
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.95;
  color: var(--muted);
  transition: color 0.4s ease;
}

.ability-card:hover .ability-body p {
  color: rgba(244, 238, 225, 0.68);
}

.ability-tags {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 22px;
}

.ability-tags li {
  padding: 4px 10px;
  border: 1px solid var(--line);
  font-size: 8px;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  transition: border-color 0.4s ease, color 0.4s ease;
}

.ability-card:hover .ability-tags li {
  border-color: rgba(244, 238, 225, 0.24);
  color: rgba(244, 238, 225, 0.68);
}

/* Reading --------------------------------------------------- */
.reading-band {
  position: relative;
  padding-block: clamp(80px, 9vw, 130px);
  background: var(--green);
  color: var(--cream);
  overflow: hidden;
}

.reading-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 40%, rgba(200, 173, 123, 0.12), transparent 28%),
    radial-gradient(circle at 12% 100%, rgba(185, 85, 61, 0.12), transparent 26%);
  pointer-events: none;
}

.reading-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.reading-word {
  position: absolute;
  top: 50%;
  left: -2%;
  font-family: var(--serif);
  font-size: clamp(150px, 28vw, 420px);
  line-height: 1;
  color: rgba(244, 238, 225, 0.035);
  transform: translateY(-50%);
  letter-spacing: 0.1em;
}

.reading-glow {
  position: absolute;
  top: 20%;
  right: 8%;
  width: 34vw;
  aspect-ratio: 1;
  border: 1px solid rgba(200, 173, 123, 0.16);
  border-radius: 50%;
}

.reading-glow::before,
.reading-glow::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(200, 173, 123, 0.1);
  border-radius: 50%;
}

.reading-glow::before { inset: 12%; }
.reading-glow::after { inset: 25%; }

.reading-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(50px, 7vw, 100px);
  align-items: center;
}

.reading-label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 8px;
  letter-spacing: 0.24em;
  color: rgba(244, 238, 225, 0.45);
}

.reading-label span {
  width: 30px;
  height: 1px;
  background: var(--terracotta-soft);
}

.reading-copy h2 {
  margin: 30px 0 24px;
  font-family: var(--serif);
  font-size: clamp(38px, 4.8vw, 64px);
  line-height: 1.26;
  letter-spacing: 0.01em;
}

.reading-copy > p:not(.reading-label) {
  max-width: 470px;
  color: rgba(244, 238, 225, 0.62);
  font-size: 13.5px;
  line-height: 2.05;
}

.reading-tags {
  display: flex;
  gap: 8px;
  margin-top: 28px;
}

.reading-tags span {
  padding: 5px 12px;
  border: 1px solid rgba(244, 238, 225, 0.18);
  font-size: 8px;
  letter-spacing: 0.12em;
  color: rgba(244, 238, 225, 0.62);
}

.reading-visual {
  position: relative;
  min-height: 440px;
  display: grid;
  place-items: center;
}

.reading-ring {
  position: absolute;
  border: 1px solid rgba(200, 173, 123, 0.22);
  border-radius: 50%;
}

.ring-large {
  width: 86%;
  aspect-ratio: 1;
  animation: ringPulse 8s ease-in-out infinite;
}

.ring-small {
  width: 62%;
  aspect-ratio: 1;
  border-style: dashed;
  opacity: 0.65;
}

@keyframes ringPulse {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.035); opacity: 1; }
}

.reading-star {
  position: absolute;
  color: var(--gold);
  font-size: 9px;
}

.star-a { top: 8%; right: 12%; animation: starTwinkle 3s ease-in-out infinite; }
.star-b { bottom: 9%; left: 8%; animation: starTwinkle 4s 1s ease-in-out infinite; }

@keyframes starTwinkle {
  0%, 100% { opacity: 0.35; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.15); }
}

.book-art {
  position: relative;
  z-index: 1;
  width: 78%;
  max-width: 460px;
  overflow: visible;
  filter: drop-shadow(0 30px 50px rgba(0, 0, 0, 0.22));
  animation: bookFloat 6s ease-in-out infinite;
}

.book-cover {
  fill: #304b3d;
  stroke: rgba(200, 173, 123, 0.45);
  stroke-width: 1;
}

.book-page {
  fill: #eee7d9;
  stroke: rgba(34, 57, 46, 0.18);
  stroke-width: 1;
}

.book-fold {
  stroke: rgba(34, 57, 46, 0.2);
  stroke-width: 1;
}

.book-line {
  stroke: rgba(34, 57, 46, 0.26);
  stroke-width: 1;
  stroke-linecap: round;
}

.book-mark {
  fill: none;
  stroke: var(--terracotta);
  stroke-width: 1.6;
}

@keyframes bookFloat {
  0%, 100% { transform: translateY(0) rotate(-0.4deg); }
  50% { transform: translateY(-10px) rotate(0.4deg); }
}

.reading-note {
  position: absolute;
  z-index: 4;
  right: -1%;
  bottom: 6%;
  padding: 18px 22px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 24px 45px -26px rgba(0, 0, 0, 0.55);
  transform: rotate(-2.5deg);
  transition: transform 0.5s var(--ease);
}

.reading-note:hover {
  transform: rotate(0deg) translateY(-4px);
}

.reading-note blockquote {
  font-family: var(--serif);
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.reading-note figcaption {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 6.5px;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.reading-note figcaption span {
  width: 18px;
  height: 1px;
  background: var(--terracotta);
}

.reading-orbit-copy {
  position: absolute;
  right: 0;
  bottom: -2%;
  writing-mode: vertical-rl;
  font-size: 6.5px;
  letter-spacing: 0.28em;
  color: rgba(244, 238, 225, 0.3);
}

/* Work ------------------------------------------------------ */
.work {
  background:
    radial-gradient(circle at 2% 20%, rgba(200, 173, 123, 0.13), transparent 24%),
    var(--paper-light);
}

.work-heading-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 50px;
  margin: clamp(46px, 6vw, 76px) 0 clamp(44px, 6vw, 68px);
}

.work-heading-row h2 {
  font-family: var(--serif);
  font-size: clamp(44px, 5.8vw, 82px);
  line-height: 1.16;
  letter-spacing: -0.02em;
  color: var(--green-deep);
}

.work-intro {
  max-width: 340px;
  padding-bottom: 8px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 2;
}

.work-card {
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(0, 0.84fr);
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  transition: box-shadow 0.6s var(--ease), transform 0.6s var(--ease);
}

.work-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 35px 70px -48px rgba(22, 38, 30, 0.55);
}

.work-preview {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 20px;
  background: #182820;
  overflow: hidden;
}

.work-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(200, 173, 123, 0.1), transparent 40%);
}

.browser-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 2px 2px 16px;
  color: rgba(244, 238, 225, 0.42);
}

.browser-dots {
  display: flex;
  gap: 5px;
}

.browser-dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(244, 238, 225, 0.26);
}

.browser-url {
  flex: 1;
  min-width: 0;
  padding: 5px 12px;
  border: 1px solid rgba(244, 238, 225, 0.1);
  font-size: 7.5px;
  letter-spacing: 0.08em;
  color: rgba(244, 238, 225, 0.35);
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.browser-live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 6.5px;
  letter-spacing: 0.2em;
  color: rgba(244, 238, 225, 0.45);
}

.browser-live i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--terracotta-soft);
}

.work-image {
  position: relative;
  aspect-ratio: 1.44;
  overflow: hidden;
  background: #bcc5b9;
}

.work-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(22, 38, 30, 0.24), transparent 38%);
}

.work-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.9s var(--ease);
}

.work-card:hover .work-image img {
  transform: scale(1.035);
}

.work-hover {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: var(--paper);
  color: var(--green);
  font-size: 10px;
  letter-spacing: 0.1em;
  transform: translate(-50%, -30%);
  opacity: 0;
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
  box-shadow: 0 16px 30px -20px rgba(0, 0, 0, 0.5);
}

.work-hover svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--terracotta);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.work-card:hover .work-hover {
  opacity: 1;
  transform: translate(-50%, -50%);
}

.work-content {
  display: flex;
  flex-direction: column;
  padding: clamp(28px, 3.5vw, 48px);
  border-left: 1px solid var(--line);
}

.work-topline {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 7px;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.work-title {
  margin-top: 32px;
}

.work-kicker {
  display: block;
  margin-bottom: 13px;
  font-size: 8px;
  letter-spacing: 0.18em;
  color: var(--terracotta);
}

.work-title h3 {
  font-family: var(--serif);
  font-size: clamp(38px, 4vw, 58px);
  line-height: 1.1;
  letter-spacing: 0.05em;
  color: var(--green-deep);
}

.work-en {
  display: block;
  margin-top: 12px;
  font-size: 7px;
  letter-spacing: 0.28em;
  color: var(--muted);
}

.work-desc {
  margin-top: 28px;
  color: var(--muted);
  font-size: 13px;
  line-height: 2;
}

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

.work-tags li {
  padding: 4px 10px;
  border: 1px solid var(--line);
  font-size: 7.5px;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
}

.work-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink);
}

.work-cta-arrow {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--terracotta);
  transition: background-color 0.35s ease, color 0.35s ease,
    transform 0.35s var(--ease);
}

.work-cta-arrow svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.work-card:hover .work-cta-arrow {
  background: var(--terracotta);
  border-color: var(--terracotta);
  color: var(--cream);
  transform: rotate(45deg);
}

.work-footer {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin-top: auto;
  padding-top: 32px;
  font-size: 6.5px;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.work-footnote {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-top: 30px;
  font-size: 8px;
  letter-spacing: 0.13em;
  color: var(--muted);
}

.work-footnote p {
  flex: 1;
}

.footnote-rule {
  width: 44px;
  height: 1px;
  background: var(--line-strong);
}

.work-footnote > span:last-child {
  white-space: nowrap;
}

/* Outro ----------------------------------------------------- */
.outro {
  position: relative;
  padding-block: clamp(110px, 13vw, 180px) clamp(90px, 11vw, 140px);
  background: var(--green-deep);
  color: var(--cream);
  overflow: hidden;
  text-align: center;
}

.outro::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 110%, rgba(185, 85, 61, 0.16), transparent 42%);
  pointer-events: none;
}

.outro-bg {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.outro-bg span {
  font-family: var(--serif);
  font-size: clamp(360px, 58vw, 880px);
  line-height: 1;
  color: rgba(244, 238, 225, 0.026);
  transform: translateY(5%);
}

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

.outro-label {
  font-size: 8px;
  letter-spacing: 0.36em;
  color: rgba(244, 238, 225, 0.4);
}

.outro h2 {
  margin: 30px 0 26px;
  font-family: var(--serif);
  font-size: clamp(50px, 7vw, 100px);
  line-height: 1.16;
  letter-spacing: 0.01em;
}

.outro h2 em {
  color: var(--terracotta-soft);
}

.outro-copy {
  color: rgba(244, 238, 225, 0.55);
  font-size: 13px;
  line-height: 2.1;
}

.back-top {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: 44px;
  padding: 11px 20px;
  border: 1px solid rgba(244, 238, 225, 0.2);
  border-radius: 99px;
  color: rgba(244, 238, 225, 0.7);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-decoration: none;
  transition: background-color 0.35s ease, border-color 0.35s ease,
    color 0.35s ease;
}

.back-top svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.35s var(--ease);
}

.back-top:hover {
  background: var(--cream);
  border-color: var(--cream);
  color: var(--green-deep);
}

.back-top:hover svg {
  transform: translateY(-3px);
}

/* Footer ---------------------------------------------------- */
.site-footer {
  background: #102019;
  color: rgba(244, 238, 225, 0.5);
  padding-block: 28px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-brand .brand-mark {
  width: 33px;
  height: 33px;
  border-color: rgba(244, 238, 225, 0.18);
  color: var(--cream);
  font-size: 15px;
}

.footer-brand > span:last-child {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.footer-brand strong {
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--cream);
}

.footer-brand small {
  margin-top: 5px;
  font-size: 6px;
  letter-spacing: 0.24em;
}

.footer-note,
.footer-copy {
  font-size: 8px;
  letter-spacing: 0.12em;
}

.footer-copy span {
  margin-inline: 6px;
  color: var(--terracotta-soft);
}

/* Responsive ------------------------------------------------ */
@media (max-width: 1180px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  }

  .portrait-float {
    left: 14%;
    width: 72%;
  }

  .tag-one { left: 0; }
  .float-tag { font-size: 7px; }
}

@media (max-width: 1024px) {
  .about-grid {
    grid-template-columns: minmax(0, 0.64fr) minmax(0, 1.36fr);
    gap: 54px;
  }

  .about-aside {
    position: static;
  }

  .about-coordinate {
    display: none;
  }

  .ability-card {
    min-height: 310px;
  }

  .reading-visual {
    min-height: 390px;
  }

  .work-card {
    grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
  }

  .work-content {
    padding: 32px;
  }
}

@media (max-width: 900px) {
  .menu-btn {
    display: block;
  }

  .header-status {
    display: none;
  }

  .main-nav {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 0;
    padding: 100px var(--gutter) 60px;
    background: var(--green-deep);
    color: var(--cream);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-100%);
    transition: transform 0.65s var(--ease), opacity 0.5s var(--ease),
      visibility 0.65s;
  }

  .main-nav::before {
    content: "MENU / 目录";
    position: absolute;
    top: 32px;
    left: var(--gutter);
    font-size: 8px;
    letter-spacing: 0.32em;
    color: rgba(244, 238, 225, 0.35);
  }

  .nav-open .main-nav {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 24px 0;
    border-bottom: 1px solid rgba(244, 238, 225, 0.14);
    color: var(--cream);
    font-family: var(--serif);
    font-size: clamp(28px, 7vw, 46px);
    letter-spacing: 0.08em;
  }

  .nav-link span {
    order: 2;
    font-size: 11px;
    color: var(--gold);
  }

  .nav-link::after {
    display: none;
  }

  .nav-open .site-header::before {
    opacity: 0;
  }

  .nav-open .brand,
  .nav-open .brand-copy strong {
    color: var(--cream);
  }

  .nav-open .brand-copy small {
    color: rgba(244, 238, 225, 0.45);
  }

  .nav-open .brand-mark {
    border-color: rgba(244, 238, 225, 0.3);
    color: var(--cream);
  }

  .nav-open .menu-btn {
    border-color: rgba(244, 238, 225, 0.3);
  }

  .hero {
    min-height: auto;
    padding-top: 138px;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 52px;
  }

  .hero-copy {
    max-width: 620px;
  }

  .hero-visual {
    width: min(100%, 540px);
    margin-inline: auto;
  }

  .hero-meta {
    max-width: 100%;
  }

  .scroll-cue {
    display: none;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .about-aside {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 34px;
  }

  .about-quote {
    margin-top: 0;
  }

  .abilities-intro {
    grid-template-columns: 1fr;
    gap: 22px;
    align-items: start;
  }

  .reading-inner {
    grid-template-columns: 1fr;
    gap: 38px;
  }

  .reading-copy {
    max-width: 620px;
  }

  .reading-visual {
    width: min(100%, 560px);
    min-height: 430px;
    margin-inline: auto;
  }

  .work-heading-row {
    display: block;
  }

  .work-intro {
    max-width: 560px;
    margin-top: 22px;
  }

  .work-card {
    grid-template-columns: 1fr;
  }

  .work-content {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .work-footer {
    padding-top: 28px;
  }
}

@media (max-width: 680px) {
  .site-header {
    padding-block: 14px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    font-size: 18px;
  }

  .brand-copy strong {
    font-size: 15px;
  }

  .brand-copy small {
    font-size: 6px;
  }

  .hero {
    padding-top: 118px;
    padding-bottom: 70px;
  }

  .hero::after {
    display: none;
  }

  .hero-title {
    margin-top: 26px;
  }

  .title-chars {
    font-size: clamp(76px, 25vw, 105px);
  }

  .hero-tagline {
    font-size: 24px;
  }

  .hero-desc {
    font-size: 13px;
  }

  .hero-actions {
    gap: 9px;
  }

  .btn {
    min-height: 48px;
    padding-inline: 20px;
    gap: 16px;
    font-size: 11px;
  }

  .hero-meta {
    gap: 22px;
    margin-top: 34px;
  }

  .hero-meta li {
    font-size: 14px;
  }

  .hero-visual {
    width: 100%;
  }

  .orbit-wrap {
    width: min(100%, 430px);
  }

  .portrait-float {
    top: 10%;
    left: 13%;
    width: 74%;
  }

  .portrait-name strong {
    font-size: 21px;
  }

  .float-tag {
    display: none;
  }

  .hero-coordinate {
    display: none;
  }

  .marquee {
    padding-block: 12px;
  }

  .marquee-group {
    gap: 24px;
    padding-right: 24px;
  }

  .marquee-group span {
    font-size: 13px;
  }

  .section {
    padding-block: 82px;
  }

  .section-head {
    gap: 12px;
    padding-bottom: 20px;
  }

  .section-side {
    display: none;
  }

  .section-rule {
    min-width: 20px;
  }

  .section-label {
    gap: 8px;
    letter-spacing: 0.18em;
  }

  .section-label b {
    font-size: 11px;
  }

  .about::before {
    top: 17%;
    font-size: 116px;
  }

  .about-title {
    margin: 38px 0 44px;
    font-size: clamp(40px, 11vw, 58px);
  }

  .about-aside {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .about-emblem {
    width: 170px;
  }

  .about-quote {
    max-width: 400px;
  }

  .about-lead {
    font-size: 23px;
  }

  .about-copy > p:not(.about-lead) {
    font-size: 13.5px;
    text-align: left;
  }

  .facts-grid {
    margin-top: 32px;
  }

  .facts-grid > div {
    padding: 16px 17px 18px;
  }

  .facts-grid dt {
    font-size: 6.5px;
  }

  .facts-grid dd {
    font-size: 18px;
  }

  .abilities-intro h2 {
    font-size: clamp(40px, 11vw, 58px);
  }

  .ability-grid {
    grid-template-columns: 1fr;
  }

  .ability-wide {
    grid-column: span 1;
    min-height: 300px;
  }

  .ability-card {
    min-height: 285px;
    padding: 25px;
  }

  .ability-body {
    padding-top: 34px;
  }

  .ability-body h3 {
    font-size: 25px;
  }

  .ability-body p {
    font-size: 12.5px;
  }

  .reading-band {
    padding-block: 72px;
  }

  .reading-visual {
    min-height: 330px;
  }

  .book-art {
    width: 84%;
  }

  .reading-note {
    right: 0;
    bottom: 0;
    padding: 13px 16px;
  }

  .reading-note blockquote {
    font-size: 12px;
  }

  .reading-orbit-copy {
    display: none;
  }

  .work-heading-row h2 {
    font-size: clamp(34px, 9vw, 48px);
    letter-spacing: -0.03em;
  }

  .work-card {
    margin-top: 34px;
  }

  .work-preview {
    padding: 12px;
  }

  .browser-bar {
    padding-bottom: 11px;
  }

  .browser-url {
    font-size: 6.5px;
    padding-inline: 7px;
  }

  .work-content {
    padding: 26px 22px;
  }

  .work-title {
    margin-top: 26px;
  }

  .work-title h3 {
    font-size: 42px;
  }

  .work-desc {
    font-size: 12.5px;
  }

  .work-footer {
    font-size: 6px;
  }

  .work-footnote {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px 16px;
  }

  .work-footnote p {
    flex-basis: calc(100% - 60px);
  }

  .outro h2 {
    font-size: clamp(46px, 13vw, 64px);
  }

  .outro-copy {
    font-size: 12px;
  }

  .footer-inner {
    flex-wrap: wrap;
    gap: 14px 24px;
  }

  .footer-note {
    order: 3;
    width: 100%;
  }

  .footer-copy {
    margin-left: auto;
  }
}

@media (max-width: 400px) {
  .hero-meta {
    gap: 16px;
  }

  .hero-meta li {
    font-size: 13px;
  }

  .portrait-head {
    font-size: 5.5px;
  }

  .portrait-facts span {
    font-size: 6px;
  }

  .facts-grid {
    grid-template-columns: 1fr;
  }

  .footer-copy {
    width: 100%;
    margin-left: 0;
  }
}

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

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

  .js .hero-copy > *,
  .js .hero-visual,
  .js .scroll-cue,
  .js .reveal {
    opacity: 1;
    transform: none;
  }

  .rain {
    display: none;
  }
}

/* Print ----------------------------------------------------- */
@media print {
  .loader,
  .site-header,
  .scroll-progress,
  .page-grain,
  .scroll-cue,
  .hero-atmosphere,
  .marquee-band {
    display: none !important;
  }

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

  .hero {
    min-height: auto;
    padding-top: 20px;
  }

  .hero-inner,
  .about-grid,
  .reading-inner,
  .work-card {
    display: block;
  }

  .hero-visual {
    margin-top: 30px;
  }

  .work-preview {
    margin-bottom: 20px;
  }

  .ability-card,
  .reading-band,
  .outro {
    break-inside: avoid;
  }
}
