:root {
  --void: #020814;
  --deep: #041830;
  --ink: #eef8ff;
  --dim: #8eb4c8;
  --cyan: #68fcfe;
  --cyan-2: #9af7ff;
  --hot: #ff1a45;
  --hot-2: #ff6b9a;
  --panel: rgba(6, 18, 42, 0.78);
  --stroke: rgba(104, 252, 254, 0.32);
  --display: "Passion One", "Barlow Condensed", "Noto Sans SC", sans-serif;
  --hud: "Barlow Condensed", "Noto Sans SC", sans-serif;
  --body: "Noto Sans SC", "Barlow Condensed", sans-serif;
  --max: 1180px;
}

html[lang="en"] {
  --display: "Passion One", "Barlow Condensed", "Noto Sans", sans-serif;
  --hud: "Barlow Condensed", "Noto Sans", sans-serif;
  --body: "Noto Sans", "Barlow Condensed", sans-serif;
}

html[lang="ja"] {
  --display: "Passion One", "Barlow Condensed", "Noto Sans JP", "Noto Sans SC", sans-serif;
  --hud: "Barlow Condensed", "Noto Sans JP", "Noto Sans SC", sans-serif;
  --body: "Noto Sans JP", "Noto Sans SC", "Barlow Condensed", sans-serif;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--void);
  font-family: var(--body);
  font-weight: 600;
}
body[data-page="home"] {
  overflow: hidden;
}
body[data-page="home"]::before {
  background:
    radial-gradient(ellipse 72% 52% at 92% -6%, #f4fdff 0%, #7ee0ff 24%, transparent 54%),
    radial-gradient(ellipse 50% 40% at 12% 20%, #cfefff 0%, transparent 58%),
    linear-gradient(118deg, #d7f2ff 0%, #1570b8 38%, #06244a 72%, #01060e 100%);
}
body[data-page="home"]::after {
  opacity: 0.18;
}
::selection { background: var(--hot); color: #fff; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(ellipse 70% 50% at 78% 8%, #7ec8ff 0%, transparent 42%),
    radial-gradient(ellipse 90% 70% at 70% 18%, #1a5cb8 0%, transparent 55%),
    radial-gradient(ellipse 60% 50% at 8% 92%, #0a3a78 0%, transparent 50%),
    linear-gradient(165deg, #04101c 0%, #082a58 38%, #031428 72%, #01060e 100%);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      180deg,
      transparent 0 3px,
      rgba(0, 8, 20, 0.18) 3px 4px
    );
  opacity: 0.35;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 80;
  padding: 8px 12px;
  background: var(--cyan);
  color: #041018;
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }

.hud {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 22px;
  background: linear-gradient(180deg, rgba(2, 8, 20, 0.94), rgba(2, 8, 20, 0.28));
  border-bottom: 1px solid var(--stroke);
}
.logo {
  font-family: var(--hud);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
}
.logo span { color: var(--cyan); }
.hud-path {
  font-family: var(--hud);
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  color: var(--dim);
  text-transform: uppercase;
}
.hud-path b { color: var(--cyan); font-weight: 800; }
.hud-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.hud-links a {
  font-family: var(--hud);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 7px 12px;
  border: 1px solid transparent;
  color: var(--dim);
}
.hud-links a:hover,
.hud-links a[aria-current="page"] {
  color: #041018;
  background: var(--cyan);
  clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.lang-sep {
  color: var(--dim);
  opacity: 0.55;
  font-family: var(--hud);
  font-size: 0.75rem;
}
.lang-btn {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--dim);
  font-family: var(--hud);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  padding: 6px 8px;
  cursor: pointer;
}
.lang-btn:hover {
  color: var(--cyan);
}
.lang-btn[aria-pressed="true"] {
  color: #041018;
  background: var(--cyan);
  clip-path: polygon(5px 0, 100% 0, calc(100% - 5px) 100%, 0 100%);
}
.home-lang {
  position: fixed;
  top: 16px;
  right: 18px;
  z-index: 40;
}

.pause {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
}
.pause-fx {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.sea-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 16% 42%;
}
.sea-glow {
  position: absolute;
  top: -18vh;
  right: -8vw;
  width: min(70vw, 920px);
  height: min(55vh, 560px);
  border-radius: 50%;
  background:
    radial-gradient(circle at 58% 38%, #fff 0 12%, #bff4ff 26%, rgba(80, 190, 255, 0.35) 48%, transparent 72%);
  filter: blur(6px);
  opacity: 0.85;
}
.sea-wave {
  position: absolute;
  top: -6vh;
  right: -10vw;
  width: min(78vw, 1100px);
  height: min(48vh, 520px);
  background:
    radial-gradient(ellipse 36% 28% at 62% 22%, rgba(255, 255, 255, 0.55), transparent 62%),
    radial-gradient(ellipse 48% 34% at 78% 38%, rgba(160, 235, 255, 0.4), transparent 58%),
    radial-gradient(ellipse 30% 22% at 48% 8%, rgba(255, 255, 255, 0.35), transparent 60%);
  mix-blend-mode: screen;
  pointer-events: none;
}
.sea-wave-1 {
  animation: sea-burst 4.2s ease-in-out infinite;
}
.sea-wave-2 {
  width: min(64vw, 880px);
  opacity: 0.7;
  animation: sea-burst 5.6s ease-in-out 1.4s infinite reverse;
}
.sea-wave-3 {
  width: min(52vw, 720px);
  height: min(36vh, 380px);
  opacity: 0.55;
  animation: sea-burst 3.4s ease-in-out 0.6s infinite;
}
.sea-rays {
  position: absolute;
  inset: -15% -10% 30% 30%;
  background: repeating-conic-gradient(
    from 210deg at 92% 0%,
    transparent 0deg 7deg,
    rgba(255, 255, 255, 0.07) 7deg 9deg
  );
  mix-blend-mode: screen;
  opacity: 0.55;
  animation: sea-rays 12s linear infinite;
}
@keyframes sea-burst {
  0%, 100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.32;
  }
  28% {
    transform: translate(-5%, 7%) scale(1.14);
    opacity: 0.9;
  }
  62% {
    transform: translate(3%, 3%) scale(1.05);
    opacity: 0.48;
  }
}
@keyframes sea-rays {
  to { transform: rotate(8deg); }
}

@media (max-width: 620px) {
  .sea-glow { opacity: 0.7; }
}

.giant,
.page-giant {
  position: absolute;
  left: -3vw;
  top: 4vh;
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(9rem, 32vw, 24rem);
  line-height: 0.72;
  letter-spacing: -0.06em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.5);
  -webkit-text-stroke: 8px rgba(0, 0, 0, 0.22);
  pointer-events: none;
  user-select: none;
  max-width: 78vw;
  overflow: hidden;
  white-space: nowrap;
  z-index: 1;
}
.giant.is-swap {
  animation: giant-in 0.22s ease-out;
}
@keyframes giant-in {
  from { opacity: 0; transform: translateX(-24px); }
  to { opacity: 1; transform: none; }
}
.page-giant {
  top: 8vh;
  font-size: clamp(6rem, 22vw, 16rem);
  opacity: 0.28;
  z-index: 0;
}
main.page > *:not(.page-giant) {
  position: relative;
  z-index: 1;
}

.pause-clock {
  position: absolute;
  left: 4vw;
  bottom: 5vh;
  top: auto;
  right: auto;
  z-index: 4;
  text-align: left;
  font-family: var(--hud);
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 2px 0 #1a3058, 2px 0 0 #1a3058, -2px 0 0 #1a3058, 0 -2px 0 #1a3058;
}
.pause-clock b {
  display: block;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 0.9;
}
.pause-clock span {
  letter-spacing: 0.22em;
  font-size: 0.95rem;
  color: var(--cyan);
}

.cmd {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 46%;
  translate: -42% -50%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: max-content;
  max-width: 92vw;
}
.cmd-item {
  --tilt: -12deg;
  --x: 0px;
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 0.45rem;
  margin: -0.12em 0;
  margin-left: var(--x);
  padding: 0.08em 0.28em 0.12em;
  color: var(--cyan);
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.6rem, 7.4vw, 5.6rem);
  line-height: 0.72;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  text-decoration: none;
  text-shadow: 0 0 18px rgba(104, 252, 254, 0.18);
  transform: rotate(var(--tilt)) skewX(-6deg);
  transform-origin: left center;
  cursor: pointer;
  opacity: 0.78;
  transition: transform 0.1s ease, color 0.1s ease, opacity 0.1s ease;
  white-space: nowrap;
}
.cmd-word,
.cmd-zh {
  position: relative;
  z-index: 2;
}
.cmd-zh {
  font-family: var(--body);
  font-size: 0.22em;
  letter-spacing: 0.22em;
  color: var(--cyan-2);
  opacity: 0.65;
  font-weight: 700;
}
.cmd-item:hover,
.cmd-item:focus-visible {
  opacity: 1;
  outline: none;
}
.slash {
  position: absolute;
  inset: -22% -16% -38% -20%;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  font-style: normal;
}
.slash::before,
.slash::after {
  content: "";
  position: absolute;
  inset: 0;
}
.slash::before {
  background: #fff;
  clip-path: polygon(8% 18%, 100% 0, 90% 86%, 0 100%);
  transform: skewX(-24deg);
}
.slash::after {
  inset: -10% -6% 6% 10%;
  background: var(--hot);
  clip-path: polygon(16% 0, 100% 10%, 84% 100%, 0 84%);
  transform: skewX(-24deg);
  mix-blend-mode: screen;
}
.cmd-item.is-on {
  z-index: 5;
  color: #0a1020;
  opacity: 1;
  text-shadow: none;
  transform: rotate(var(--tilt)) skewX(8deg) scale(1.42) translateX(14px);
}
.cmd-item.is-on .cmd-zh { color: #1a2030; opacity: 1; }
.cmd-item.is-on .slash {
  opacity: 1;
  animation: slash-kick 0.16s ease-out;
}
.cmd-item.is-on .slash::after {
  animation: slash-pulse 0.75s ease-in-out infinite alternate;
}
@keyframes slash-kick {
  from { transform: scale(0.86) translateX(-8px); opacity: 0.4; }
  to { transform: none; opacity: 1; }
}
@keyframes slash-pulse {
  from { transform: skewX(-24deg) rotate(0deg) scale(1); opacity: 0.85; }
  to { transform: skewX(-24deg) rotate(1.4deg) scale(1.06); opacity: 1; }
}

.pause-meta {
  position: absolute;
  right: 4vw;
  bottom: 5vh;
  z-index: 4;
  text-align: right;
  font-family: var(--hud);
  max-width: 42vw;
}
.cmd-index {
  font-family: var(--display);
  font-size: clamp(3.4rem, 9vw, 7rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 0.72;
  color: #fff;
  -webkit-text-stroke: 5px #000;
}
.cmd-desc {
  margin: 8px 0 10px;
  font-size: clamp(1.05rem, 2.4vw, 1.45rem);
  font-style: italic;
  color: #fff;
  text-shadow:
    1px 0 0 #000, -1px 0 0 #000, 0 1px 0 #000, 0 -1px 0 #000;
}
.cmd-label {
  margin: 0 0 12px;
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #fff;
  position: relative;
  display: inline-block;
  padding-right: 72px;
}
.cmd-label::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  width: 64px;
  height: 2px;
  background: #fff;
  box-shadow: 0 0 0 1px #000;
}
.cmd-keys {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  font-size: 0.92rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.cmd-keys span {
  position: relative;
  padding: 5px 14px;
}
.cmd-keys span::before {
  content: "";
  position: absolute;
  inset: -2px -8px;
  border: 1.5px solid #fff;
  border-radius: 999px;
}
.who {
  position: absolute;
  top: 4.2vh;
  right: 4vw;
  left: auto;
  z-index: 6;
  max-width: min(52vw, 560px);
  text-align: right;
}
.who-kicker {
  margin: 0 0 6px;
  font-family: var(--hud);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--cyan);
}
.who h1 {
  margin: 0;
  font-family: var(--hud);
  font-weight: 800;
  font-size: clamp(2.6rem, 6.2vw, 4.8rem);
  line-height: 0.95;
  letter-spacing: 0.04em;
  color: #fff;
  text-shadow:
    0 3px 0 #000,
    3px 5px 0 rgba(0, 0, 0, 0.28);
}
.who-role {
  margin: 10px 0 0;
  font-family: var(--hud);
  font-size: clamp(0.95rem, 2vw, 1.2rem);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
}

main.page {
  position: relative;
  width: min(calc(100% - 40px), var(--max));
  margin-inline: auto;
  padding: 28px 0 80px;
  z-index: 1;
}
.page-hero { padding: 28px 0 8px; }
.page-hero p {
  max-width: 680px;
  color: var(--dim);
  line-height: 1.6;
}
.page-hero a { color: var(--cyan); }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin: 36px 0 22px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--stroke);
}
h1, h2, h3 { font-family: var(--hud); font-weight: 800; text-wrap: pretty; }
h2 {
  margin: 0;
  font-size: clamp(2.2rem, 6vw, 4.4rem);
  line-height: 0.9;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.counter {
  font-family: var(--hud);
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  padding: 8px 12px;
  background: var(--hot);
  color: #fff;
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
  white-space: nowrap;
}

.cv-org { margin: 0 0 18px; letter-spacing: 0.08em; }
.cv-card,
.project-card,
.post-card,
.empty,
.info-card {
  background: var(--panel);
  border: 1px solid var(--stroke);
  padding: clamp(18px, 3vw, 32px);
  margin-bottom: 16px;
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
}
.cv-card { scroll-margin-top: 80px; margin-bottom: 0; }
.cv-card h3,
.project-card h3,
.post-card h3 {
  margin: 0 0 10px;
  font-size: 1.45rem;
  letter-spacing: 0.03em;
}
.cv-meta,
.post-date,
.project-type,
.project-number {
  font-family: var(--hud);
  letter-spacing: 0.12em;
  color: var(--cyan);
  font-size: 0.85rem;
  margin: 0 0 8px;
}
.cv-card p, .cv-card li, .post-card p { line-height: 1.65; color: var(--dim); }
.cv-card ul { margin: 0; padding-left: 1.15em; }
.cv-card li { margin-bottom: 0.4em; }

/* Resume zigzag timeline */
.resume-page #resume-root {
  padding-bottom: 48px;
}
.cv-timeline {
  position: relative;
  width: 100%;
  padding: 12px 0 24px;
}
.cv-timeline-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  translate: -50% 0;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(104, 252, 254, 0.55) 8%,
    rgba(104, 252, 254, 0.35) 50%,
    rgba(255, 26, 69, 0.35) 92%,
    transparent 100%
  );
  pointer-events: none;
}
.cv-tl-marker {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  margin: 28px 0 18px;
}
.cv-tl-marker:first-child { margin-top: 8px; }
.cv-tl-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--void);
  border: 2px solid var(--cyan);
  box-shadow: 0 0 0 4px rgba(104, 252, 254, 0.15);
  margin-bottom: 10px;
}
.cv-tl-marker-card {
  width: min(100%, 520px);
  text-align: center;
  padding: 14px 18px;
  background: rgba(6, 18, 42, 0.92);
  border: 1px solid var(--stroke);
}
.cv-tl-marker-card .section-head {
  justify-content: center;
  margin-bottom: 6px;
}
.cv-tl-marker-card .cv-org {
  margin: 0;
  color: var(--dim);
  font-size: 0.9rem;
}
.cv-tl-item {
  position: relative;
  z-index: 1;
  width: calc(50% - 28px);
  margin-bottom: 22px;
}
.cv-tl-item.is-left {
  margin-right: auto;
  padding-right: 8px;
}
.cv-tl-item.is-right {
  margin-left: auto;
  padding-left: 8px;
}
.cv-tl-node {
  position: absolute;
  top: 22px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cyan);
  border: 2px solid var(--void);
  box-shadow: 0 0 12px rgba(104, 252, 254, 0.55);
}
.cv-tl-item.is-left .cv-tl-node {
  right: -33px;
}
.cv-tl-item.is-right .cv-tl-node {
  left: -33px;
}
.cv-tl-item .cv-card {
  transition: border-color 0.2s ease, background 0.2s ease;
}
.cv-tl-item:hover .cv-card {
  border-color: rgba(104, 252, 254, 0.55);
  background: rgba(8, 28, 58, 0.9);
}

@media (max-width: 900px) {
  .cv-timeline-line {
    left: 12px;
    translate: 0 0;
  }
  .cv-tl-marker {
    justify-items: stretch;
    padding-left: 28px;
  }
  .cv-tl-marker-card {
    width: 100%;
    text-align: left;
  }
  .cv-tl-marker-card .section-head {
    justify-content: flex-start;
  }
  .cv-tl-item,
  .cv-tl-item.is-left,
  .cv-tl-item.is-right {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding-left: 28px;
    padding-right: 0;
  }
  .cv-tl-item.is-left .cv-tl-node,
  .cv-tl-item.is-right .cv-tl-node {
    left: 8px;
    right: auto;
  }
}

/* Resume only: white sketch / hand-drawn theme + staggered fade */
body[data-page="resume"] {
  color: #2c2a26;
  background: #f7f4ef;
}
body[data-page="resume"]::before {
  background:
    radial-gradient(ellipse 70% 40% at 10% 0%, rgba(255, 255, 255, 0.9), transparent 55%),
    radial-gradient(ellipse 50% 35% at 90% 10%, rgba(214, 232, 220, 0.55), transparent 50%),
    linear-gradient(180deg, #fbfaf7 0%, #f3efe8 48%, #efeae2 100%);
}
body[data-page="resume"]::after {
  opacity: 0.07;
  background:
    repeating-linear-gradient(
      0deg,
      transparent 0 3px,
      rgba(60, 50, 40, 0.08) 3px 4px
    );
}
body[data-page="resume"] .hud {
  background: rgba(255, 252, 247, 0.86);
  border-bottom: 1px solid rgba(50, 45, 40, 0.12);
  backdrop-filter: blur(8px);
}
body[data-page="resume"] .hud-path,
body[data-page="resume"] .hud-links a,
body[data-page="resume"] .lang-btn {
  color: #5a554c;
}
body[data-page="resume"] .hud-path b,
body[data-page="resume"] .hud-links a:hover,
body[data-page="resume"] .hud-links a[aria-current="page"],
body[data-page="resume"] .lang-btn[aria-pressed="true"] {
  color: #2f6b5a;
}
body[data-page="resume"] .lang-btn {
  border-color: rgba(50, 45, 40, 0.18);
  background: transparent;
}
body[data-page="resume"] .page-giant {
  color: rgba(47, 107, 90, 0.1);
}
body[data-page="resume"] .hud-foot {
  color: #7a7468;
  border-top: 1px solid rgba(50, 45, 40, 0.1);
  background: rgba(255, 252, 247, 0.75);
}
body[data-page="resume"] .hud-foot a { color: #2f6b5a; }

body[data-page="resume"] .resume-page .page-hero {
  color: #2c2a26;
}
body[data-page="resume"] .resume-page .page-hero a {
  color: #2f6b5a;
}
body[data-page="resume"] .resume-page .section-head h2 {
  color: #1f1d1a;
  font-family: "Barlow Condensed", "Noto Sans SC", sans-serif;
  letter-spacing: 0.04em;
}
body[data-page="resume"] .resume-page .counter {
  color: #6d8f82;
  background: transparent;
  border: 1.5px solid rgba(47, 107, 90, 0.35);
  clip-path: none;
  border-radius: 255px 20px 225px 15px / 15px 225px 20px 255px;
}

body[data-page="resume"] .cv-timeline-line {
  width: 1.5px;
  background: repeating-linear-gradient(
    180deg,
    rgba(70, 64, 56, 0.45) 0 6px,
    transparent 6px 10px
  );
}
body[data-page="resume"] .cv-tl-dot {
  background: #f7f4ef;
  border: 2px solid #3d3a34;
  box-shadow: 0 0 0 3px rgba(47, 107, 90, 0.12);
}
body[data-page="resume"] .cv-tl-node {
  background: #2f6b5a;
  border: 2px solid #f7f4ef;
  box-shadow: none;
}
body[data-page="resume"] .cv-tl-marker-card {
  background: #fffefb;
  border: 1.5px solid #3d3a34;
  border-radius: 18px 28px 16px 24px / 24px 16px 28px 18px;
  box-shadow: 3px 4px 0 rgba(61, 58, 52, 0.08);
}
body[data-page="resume"] .cv-tl-marker-card .cv-org {
  color: #6a655c;
}
body[data-page="resume"] .cv-tl-item .cv-card {
  background: #fffefb;
  border: 1.5px solid #3d3a34;
  clip-path: none;
  border-radius: 22px 14px 26px 18px / 16px 24px 14px 22px;
  box-shadow: 3px 5px 0 rgba(61, 58, 52, 0.07);
  color: #2c2a26;
}
body[data-page="resume"] .cv-tl-item:hover .cv-card {
  border-color: #2f6b5a;
  background: #fbfaf6;
  box-shadow: 4px 6px 0 rgba(47, 107, 90, 0.12);
}
body[data-page="resume"] .cv-meta {
  color: #2f6b5a;
}
body[data-page="resume"] .cv-card h3 {
  color: #1f1d1a;
  font-size: 1.25rem;
}
body[data-page="resume"] .cv-card p,
body[data-page="resume"] .cv-card li {
  color: #4a463e;
}
body[data-page="resume"] .cv-card strong {
  color: #2c2a26;
}

body[data-page="resume"] .cv-fade {
  opacity: 0;
  transform: translateY(22px);
  animation: cvSketchIn 0.75s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(var(--cv-i, 0) * 0.11s + 0.08s);
}
@keyframes cvSketchIn {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (prefers-reduced-motion: reduce) {
  body[data-page="resume"] .cv-fade {
    opacity: 1;
    transform: none;
    animation: none;
  }
}

@media (max-width: 900px) {
  .cv-timeline-line {
    left: 12px;
    translate: 0 0;
  }
  .cv-tl-marker {
    justify-items: stretch;
    padding-left: 28px;
  }
  .cv-tl-marker-card {
    width: 100%;
    text-align: left;
  }
  .cv-tl-marker-card .section-head {
    justify-content: flex-start;
  }
  .cv-tl-item,
  .cv-tl-item.is-left,
  .cv-tl-item.is-right {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding-left: 28px;
    padding-right: 0;
  }
  .cv-tl-item.is-left .cv-tl-node,
  .cv-tl-item.is-right .cv-tl-node {
    left: 8px;
    right: auto;
  }
}
.project-tools { margin: 0 0 22px; }
.search {
  width: 100%;
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--stroke);
  outline: none;
}
.search:focus { border-color: var(--cyan); }

.projects {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.project-card {
  min-height: 210px;
  display: flex;
  flex-direction: column;
  margin: 0;
  position: relative;
}
.project-card[hidden] { display: none; }
.project-number {
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: -0.06em;
  color: #fff;
  -webkit-text-stroke: 3px #000;
}
.project-type {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 4px 8px;
  border: 1px solid var(--cyan);
}
.project-link,
.post-card a,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--stroke);
  text-decoration: none;
  font-family: var(--hud);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
}
.button {
  border: 1px solid var(--cyan);
  padding: 8px 14px;
  margin-top: 16px;
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
}
.posts { display: grid; gap: 14px; }
.empty { text-align: center; color: var(--dim); }

.contacts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.contact-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  background: var(--panel);
  border: 1px solid var(--stroke);
  text-decoration: none;
}
.contact-item:hover { border-color: var(--cyan); background: rgba(104, 252, 254, 0.08); }
.contact-label {
  font-family: var(--hud);
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  color: var(--cyan);
}

.article { max-width: 760px; }
.article h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  letter-spacing: 0.02em;
  margin: 8px 0 14px;
}
.article .lede { color: var(--dim); font-size: 1.1rem; }
.article .body p,
.article .body li { color: var(--dim); line-height: 1.75; }
.article .body h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin: 32px 0 12px;
}
.article-figure {
  margin: 22px 0 28px;
  padding: 0;
  border: 1px solid var(--stroke);
  background: rgba(2, 8, 20, 0.55);
}
.article-figure img {
  display: block;
  width: 100%;
  height: auto;
}
.article-figure figcaption {
  padding: 10px 14px 12px;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--dim);
  border-top: 1px solid rgba(104, 252, 254, 0.16);
}
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; }
.article-cta {
  margin-top: 36px;
  padding-top: 22px;
  border-top: 1px solid rgba(104, 252, 254, 0.18);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.article-cta-block { margin: 0; }
.article-cta-label {
  margin: 0 0 6px;
  font-family: var(--hud);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--cyan);
}
.article-cta-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.article-cta a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid rgba(104, 252, 254, 0.35);
}
.article-cta a:hover { border-bottom-color: var(--cyan); color: var(--cyan-2); }
.article-cta-block > p { margin: 0; color: var(--dim); }
.tag {
  border: 1px solid var(--cyan);
  color: var(--cyan);
  padding: 6px 10px;
  font-family: var(--hud);
  letter-spacing: 0.12em;
  font-size: 0.75rem;
}
.back-link { display: inline-flex; }

.article-comments {
  margin: 48px 0 28px;
  padding-top: 28px;
  border-top: 1px solid rgba(104, 252, 254, 0.22);
}
.article-comments h2 {
  margin: 0 0 8px;
  font-size: clamp(1.2rem, 2.6vw, 1.6rem);
}
.comments-note {
  margin: 0 0 18px;
  color: var(--dim);
  font-size: 0.9rem;
  line-height: 1.55;
}
#giscus-root,
.giscus {
  min-height: 120px;
}
.giscus-frame {
  width: 100% !important;
  border: none !important;
}

.hud-foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  width: min(calc(100% - 40px), var(--max));
  margin: 0 auto;
  padding: 18px 0 28px;
  font-family: var(--hud);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--dim);
}

.reveal { opacity: 0; transform: translateY(16px); transition: 0.45s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* —— Blog tarot deck —— */
.blog-page .page-hero { max-width: 36rem; }
.blog-deck {
  display: grid;
  grid-template-columns: minmax(200px, 0.9fr) minmax(280px, 1.1fr);
  gap: clamp(20px, 4vw, 48px);
  align-items: start;
  padding: 8px 0 48px;
  perspective: 1400px;
}
.blog-toc-kicker {
  margin: 0 0 12px;
  font-family: var(--hud);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--cyan);
}
.blog-toc-kicker-sub {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin-top: 4px;
}
.blog-toc-cat-name {
  letter-spacing: 0.08em;
  text-transform: none;
  color: var(--dim);
  font-size: 0.78rem;
}
.blog-cat-rail {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 4px;
}
.blog-cat {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(104, 252, 254, 0.16);
  border-left: 2px solid rgba(104, 252, 254, 0.22);
  background: rgba(2, 10, 24, 0.35);
  color: var(--dim);
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.blog-cat:hover,
.blog-cat:focus-visible {
  outline: none;
  border-color: rgba(104, 252, 254, 0.4);
  color: var(--ink);
  background: rgba(104, 252, 254, 0.06);
}
.blog-cat.is-on {
  border-left-color: var(--cyan);
  border-color: rgba(104, 252, 254, 0.45);
  background: rgba(104, 252, 254, 0.1);
  color: var(--ink);
}
.blog-cat-label {
  font-family: var(--display);
  font-size: 1.05rem;
  letter-spacing: 0.04em;
}
.blog-cat-count {
  font-family: var(--hud);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--cyan);
  opacity: 0.85;
}
.blog-toc-divider {
  height: 1px;
  margin: 14px 0 12px;
  background: linear-gradient(
    90deg,
    rgba(104, 252, 254, 0.45),
    rgba(104, 252, 254, 0.08) 70%,
    transparent
  );
}
.blog-toc-empty {
  margin: 0;
  padding: 14px 12px;
  color: var(--dim);
  font-size: 0.88rem;
  line-height: 1.5;
  border-left: 2px dashed rgba(104, 252, 254, 0.25);
}
.tarot-copy-empty {
  justify-content: center;
  padding: 28px 20px !important;
}
.blog-toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: min(62vh, 560px);
  overflow: auto;
  padding-right: 4px;
  scrollbar-width: thin;
}
.blog-toc-item {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  text-align: left;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-left: 2px solid rgba(104, 252, 254, 0.18);
  background: transparent;
  cursor: pointer;
  color: var(--dim);
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.blog-toc-item:hover,
.blog-toc-item:focus-visible {
  outline: none;
  border-color: rgba(104, 252, 254, 0.35);
  background: rgba(104, 252, 254, 0.06);
  color: var(--ink);
}
.blog-toc-item.is-on {
  border-left-color: var(--cyan);
  border-color: rgba(104, 252, 254, 0.4);
  background: rgba(104, 252, 254, 0.1);
  color: var(--ink);
}
.blog-toc-item[data-draft="1"] .blog-toc-title { opacity: 0.85; }
.blog-toc-num {
  font-family: var(--hud);
  letter-spacing: 0.12em;
  color: var(--cyan);
  font-size: 0.85rem;
  padding-top: 2px;
}
.blog-toc-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.blog-toc-date {
  font-family: var(--hud);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.75;
}
.blog-toc-title {
  font-size: 0.92rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  position: sticky;
  top: 88px;
}
.blog-deck-hint {
  margin: 0;
  font-family: var(--hud);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.68rem;
  color: var(--dim);
  text-align: center;
}

.tarot {
  width: min(100%, 320px);
  aspect-ratio: 2 / 3.2;
  perspective: 1200px;
}
.tarot-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transform: rotateY(0deg);
  will-change: transform;
}
.tarot-face {
  position: absolute;
  inset: 0;
  border-radius: 14px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(104, 252, 254, 0.25);
}
.tarot-front {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  background:
    linear-gradient(165deg, rgba(12, 36, 72, 0.96) 0%, rgba(4, 16, 36, 0.98) 100%);
  transform: rotateY(0deg);
}
.tarot-cover {
  flex: 0 0 46%;
  min-height: 0;
  overflow: hidden;
  border-bottom: 1px solid rgba(104, 252, 254, 0.22);
  background: #020814;
}
.tarot-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}
.tarot-copy {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px 16px;
  min-height: 0;
}
.tarot-front:not(:has(.tarot-cover)) .tarot-copy {
  padding: 22px 20px 18px;
}
.tarot-back {
  transform: rotateY(180deg);
  display: grid;
  place-items: center;
  background: #0a0c12;
  padding: 10px;
}
.tarot-back-art {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  user-select: none;
  pointer-events: none;
}
.tarot-date {
  font-family: var(--hud);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.68rem;
  color: var(--cyan);
}
.tarot-title {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.02rem, 2.1vw, 1.28rem);
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-transform: none;
}
.tarot-front:not(:has(.tarot-cover)) .tarot-title {
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.tarot-summary {
  margin: 0;
  flex: 1;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--dim);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}
.tarot-front:not(:has(.tarot-cover)) .tarot-summary {
  font-size: 0.86rem;
  line-height: 1.55;
  overflow: auto;
  display: block;
  -webkit-line-clamp: unset;
}
.tarot-cta {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding: 10px 12px;
  border: 1px solid var(--stroke);
  background: rgba(104, 252, 254, 0.08);
  text-decoration: none;
  font-family: var(--hud);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--cyan-2);
}
.tarot-cta:hover { border-color: var(--cyan); background: rgba(104, 252, 254, 0.14); }
.tarot-cta.is-soon {
  color: var(--dim);
  border-style: dashed;
  cursor: default;
}

@media (prefers-reduced-motion: reduce) {
  #tarot-inner { transition: none !important; }
}

@media (max-width: 900px) {
  .blog-deck {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .blog-cat-rail {
    flex-direction: row;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 4px;
  }
  .blog-cat {
    flex: 0 0 auto;
    min-width: 7.5rem;
  }
  .blog-toc-list {
    flex-direction: row;
    max-height: none;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 6px;
  }
  .blog-toc-list > li { flex: 0 0 min(70vw, 260px); }
  .blog-toc-item { min-height: 100%; }
  .blog-stage { position: static; }
  .tarot { width: min(100%, 300px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

@media (max-width: 900px) {
  .giant { font-size: 28vw; top: auto; bottom: 22vh; }
  .cmd {
    left: 8vw;
    translate: 0 -46%;
  }
  .projects, .contacts { grid-template-columns: 1fr; }
  .pause-meta { max-width: 70vw; }
  .pause-clock { left: 6vw; }
  .who { max-width: 70vw; }
}

@media (max-width: 620px) {
  .hud { flex-wrap: wrap; }
  .cmd-item { font-size: 2.35rem; }
  .cmd-item.is-on { transform: rotate(var(--tilt)) skewX(6deg) scale(1.18) translateX(6px); }
  main.page { width: min(calc(100% - 24px), var(--max)); }
  .cmd-zh { display: none; }
  .pause-meta { right: 5vw; bottom: 12vh; }
  .who {
    max-width: calc(100vw - 28px);
  }
  .who h1 { font-size: 2.2rem; }
}
