* {
  box-sizing: border-box;
}

:root {
  --paper: #fbf7ea;
  --ink: #080808;
  --red: #c9182b;
  --mist: rgba(255, 253, 245, 0.78);
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  color: var(--ink);
  background: #080808;
  font-family: Arial, Helvetica, sans-serif;
}

.stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: radial-gradient(circle at 50% 40%, #2b2b2b, #070707 68%);
}

.layer {
  position: absolute;
  inset: -12%;
  pointer-events: none;
  will-change: transform;
}

.layer-grid {
  background-image:
    linear-gradient(rgba(255,255,255,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.08) 1px, transparent 1px);
  background-size: 82px 82px;
  opacity: 0.35;
}

.layer-tone {
  background-image: radial-gradient(circle, rgba(255,255,255,0.22) 1px, transparent 1px);
  background-size: 9px 9px;
  opacity: 0.25;
}

.layer-streaks {
  background: repeating-linear-gradient(115deg, transparent 0 28px, rgba(255,255,255,0.12) 28px 30px);
  opacity: 0.38;
}

.topbar {
  position: fixed;
  top: 18px;
  left: 18px;
  right: 18px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border: 4px solid var(--ink);
  background: var(--paper);
  box-shadow: 6px 6px 0 var(--ink);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand span {
  padding: 6px 9px;
  background: var(--ink);
  color: white;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.brand h1 {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 2.25rem);
  line-height: 0.9;
  text-transform: uppercase;
  letter-spacing: -0.05em;
  white-space: nowrap;
}

.home-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 12px;
  border: 3px solid var(--ink);
  background: white;
  box-shadow: 3px 3px 0 var(--ink);
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}

.h-scroll {
  position: relative;
  z-index: 2;
  height: 100vh;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: thin;
}

.track {
  display: flex;
  width: max-content;
  min-height: 100vh;
  padding: 118px 8vw 42px;
  gap: 28px;
}

.project-panel {
  scroll-snap-align: center;
  flex: 0 0 min(82vw, 940px);
  min-height: calc(100vh - 170px);
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 24px;
  padding: clamp(22px, 4vw, 42px);
  border: 5px solid var(--ink);
  background:
    repeating-linear-gradient(-36deg, transparent 0 18px, rgba(8, 8, 8, 0.1) 18px 20px),
    var(--paper);
  box-shadow: 10px 10px 0 rgba(0,0,0,0.8);
}

.project-panel.hero-card {
  flex-basis: min(74vw, 820px);
  grid-template-columns: 1fr;
  align-content: center;
}

.kicker {
  display: inline-block;
  width: max-content;
  margin: 0 0 18px;
  padding: 7px 10px;
  background: var(--red);
  color: white;
  box-shadow: 4px 4px 0 var(--ink);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.project-panel h2 {
  margin: 0 0 18px;
  font-size: clamp(3.2rem, 8vw, 7.2rem);
  line-height: 0.82;
  letter-spacing: -0.07em;
  text-transform: uppercase;
}

.project-panel p {
  max-width: 650px;
  margin: 0 0 18px;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  line-height: 1.55;
  font-weight: 900;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.meta span,
.panel-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  border: 3px solid var(--ink);
  background: white;
  box-shadow: 4px 4px 0 var(--ink);
  font-weight: 900;
  text-transform: uppercase;
}

.panel-link {
  margin-top: 10px;
  background: var(--red);
  color: white;
  text-decoration: none;
}

.visual {
  position: relative;
  min-height: 100%;
  border: 4px solid var(--ink);
  overflow: hidden;
  background:
    radial-gradient(circle at 70% 28%, rgba(201, 24, 43, 0.35), transparent 28%),
    repeating-radial-gradient(circle at 50% 50%, rgba(8,8,8,0.18) 0 2px, transparent 2px 16px),
    white;
}

.visual::before {
  content: "";
  position: absolute;
  inset: -20%;
  background: repeating-linear-gradient(100deg, transparent 0 24px, rgba(8,8,8,0.16) 24px 27px);
  animation: drift 8s linear infinite;
}

.visual strong {
  position: absolute;
  left: 22px;
  bottom: 22px;
  max-width: 80%;
  font-size: clamp(2.2rem, 5vw, 4.6rem);
  line-height: 0.86;
  letter-spacing: -0.06em;
  text-transform: uppercase;
}

.progress {
  position: fixed;
  left: 18px;
  right: 18px;
  bottom: 16px;
  z-index: 10;
  height: 10px;
  border: 2px solid var(--ink);
  background: var(--paper);
}

.progress span {
  display: block;
  width: 0%;
  height: 100%;
  background: var(--red);
}

.hint {
  position: fixed;
  right: 20px;
  bottom: 34px;
  z-index: 11;
  color: white;
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

@keyframes drift {
  to { transform: translateX(90px); }
}

@media (max-width: 760px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .brand h1 {
    white-space: normal;
  }

  .track {
    padding: 156px 18px 42px;
    gap: 18px;
  }

  .project-panel {
    flex-basis: calc(100vw - 36px);
    grid-template-columns: 1fr;
    min-height: calc(100vh - 206px);
  }

  .visual {
    min-height: 260px;
  }

  .hint {
    display: none;
  }
}

.project-image {
  background-size: cover;
  background-position: center;
}

.project-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, transparent, rgba(0,0,0,0.42));
}

.project-image strong {
  z-index: 1;
  color: white;
  text-shadow: 4px 4px 0 var(--ink);
}

/* Compact horizontal cards and hide native scrollbar. */
.h-scroll {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.h-scroll::-webkit-scrollbar {
  display: none;
}

.track {
  padding: 138px 6vw 58px;
  gap: 22px;
}

.project-panel {
  flex: 0 0 min(68vw, 760px);
  min-height: calc(100vh - 240px);
  padding: clamp(18px, 3vw, 30px);
}

.project-panel.hero-card {
  flex-basis: min(62vw, 700px);
}

.project-panel h2 {
  font-size: clamp(2.4rem, 5.8vw, 5rem);
}

.project-panel p {
  font-size: clamp(0.95rem, 1.25vw, 1.08rem);
  line-height: 1.5;
}

.visual strong {
  font-size: clamp(1.8rem, 4vw, 3.6rem);
}

@media (max-width: 760px) {
  .track {
    padding: 166px 16px 56px;
  }

  .project-panel,
  .project-panel.hero-card {
    flex-basis: calc(92vw - 28px);
    min-height: calc(100vh - 244px);
  }
}

/* Global portfolio theme system. */
:root {
  --panel-bg: var(--paper);
  --button-bg: #ffffff;
  --shadow-strong: rgba(0, 0, 0, 0.8);
  --stage-a: #2b2b2b;
  --stage-b: #070707;
  --line-soft: rgba(8, 8, 8, 0.1);
}

html[data-theme="dark"] {
  --paper: #14120f;
  --ink: #f5f1e7;
  --red: #ff3650;
  --mist: rgba(20, 18, 15, 0.84);
  --panel-bg: #1e1b16;
  --button-bg: #29251f;
  --shadow-strong: #000000;
  --stage-a: #191714;
  --stage-b: #050505;
  --line-soft: rgba(245, 241, 231, 0.13);
}

html,
body,
.stage,
.topbar,
.project-panel,
.home-link,
.meta span,
.panel-link,
.visual,
.progress,
.theme-toggle {
  transition: background-color 240ms ease, color 240ms ease, border-color 240ms ease, box-shadow 240ms ease, filter 240ms ease;
}

html[data-theme="dark"] body {
  color: var(--ink);
  background: #050505;
}

html[data-theme="dark"] .stage {
  background: radial-gradient(circle at 50% 40%, var(--stage-a), var(--stage-b) 68%);
}

html[data-theme="dark"] .topbar,
html[data-theme="dark"] .project-panel,
html[data-theme="dark"] .progress {
  background-color: var(--panel-bg);
  color: var(--ink);
  border-color: var(--ink);
}

html[data-theme="dark"] .project-panel {
  background:
    repeating-linear-gradient(-36deg, transparent 0 18px, rgba(245, 241, 231, 0.12) 18px 20px),
    var(--panel-bg);
  box-shadow: 10px 10px 0 var(--shadow-strong);
}

html[data-theme="dark"] .home-link,
html[data-theme="dark"] .meta span {
  background: var(--button-bg);
  color: var(--ink);
  border-color: var(--ink);
}

html[data-theme="dark"] .brand span,
html[data-theme="dark"] .kicker {
  color: #fffdf5;
  background: #050505;
}

html[data-theme="dark"] .panel-link {
  color: #fffdf5;
  background: var(--red);
  border-color: var(--ink);
}

html[data-theme="dark"] .visual {
  background:
    radial-gradient(circle at 70% 28%, rgba(255, 54, 80, 0.28), transparent 28%),
    repeating-radial-gradient(circle at 50% 50%, rgba(245, 241, 231, 0.16) 0 2px, transparent 2px 16px),
    #111;
}

html[data-theme="dark"] .layer-grid {
  opacity: 0.22;
}

html[data-theme="dark"] .layer-tone {
  opacity: 0.18;
}

.theme-toggle {
  position: fixed;
  right: 18px;
  bottom: 34px;
  z-index: 1200;
  display: inline-grid;
  min-width: 92px;
  min-height: 48px;
  padding: 7px 12px;
  border: 3px solid var(--ink);
  background: var(--button-bg, #fff);
  color: var(--ink);
  box-shadow: 4px 4px 0 var(--shadow-strong, #080808);
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
}

.theme-toggle span {
  font-size: 0.74rem;
  line-height: 1;
}

.theme-toggle strong {
  font-size: 1rem;
  line-height: 1;
}

.theme-toggle:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--shadow-strong, #080808);
}

html[data-theme="dark"] .theme-toggle {
  background: #050505;
  color: #fffdf5;
  border-color: var(--ink);
}

@media (max-width: 760px) {
  .theme-toggle {
    right: 12px;
    bottom: 14px;
    min-width: 78px;
    min-height: 42px;
    padding: 6px 9px;
  }
}
/* Project image and theme contrast cleanup. */
.project-image strong {
  display: none !important;
}

.project-image::after {
  background: radial-gradient(circle at 50% 50%, transparent 42%, rgba(0, 0, 0, 0.28));
}

html[data-theme="dark"] .home-link,
html[data-theme="dark"] .meta span,
html[data-theme="dark"] .theme-toggle {
  color: #fffdf5 !important;
  background: #050505 !important;
  border-color: #fffdf5 !important;
}

html[data-theme="dark"] .panel-link,
html[data-theme="dark"] .kicker {
  color: #fffdf5 !important;
  border-color: #fffdf5 !important;
}

html[data-theme="light"] .home-link,
html[data-theme="light"] .meta span,
html[data-theme="light"] .theme-toggle {
  color: #080808 !important;
  background: #ffffff !important;
}

.hint {
  right: 132px;
  bottom: 31px;
  padding: 5px 8px;
  color: #fffdf5;
  background: rgba(5, 5, 5, 0.78);
  border: 2px solid rgba(255, 253, 245, 0.7);
}

@media (max-width: 760px) {
  .hint {
    display: none;
  }
}
/* Project thumbnail image rendering. */
.project-image {
  background: #050505 !important;
}

.project-thumb {
  position: relative;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 100%;
  object-fit: cover;
  object-position: center;
}

.project-image::after {
  z-index: 1;
  pointer-events: none;
}
/* Theme icon button polish. */
.theme-toggle {
  min-width: 52px !important;
  width: 52px;
  height: 52px;
  min-height: 52px !important;
  place-items: center;
  padding: 0 !important;
  font-size: 1.7rem;
  line-height: 1;
}

.theme-toggle span[aria-hidden="true"] {
  display: block;
  font-size: 1.65rem;
  line-height: 1;
}

.theme-toggle strong {
  display: none;
}

.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;
}
/* Drawn sun/moon theme icons. */
.theme-icon {
  position: relative;
  display: block;
  width: 26px;
  height: 26px;
}

html[data-theme="light"] .theme-icon {
  border: 4px solid #080808;
  border-radius: 50%;
  background: #ffcc33;
  box-shadow:
    0 -14px 0 -9px #080808,
    0 14px 0 -9px #080808,
    14px 0 0 -9px #080808,
    -14px 0 0 -9px #080808,
    10px 10px 0 -10px #080808,
    -10px 10px 0 -10px #080808,
    10px -10px 0 -10px #080808,
    -10px -10px 0 -10px #080808;
}

html[data-theme="dark"] .theme-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #050505;
  box-shadow: inset -9px 0 0 #fffdf5;
  transform: rotate(-18deg);
}
/* Premium manga archive upgrade layer. */
.stage {
  background:
    radial-gradient(circle at 72% 24%, rgba(213, 19, 45, 0.18), transparent 24%),
    radial-gradient(circle at 42% 48%, rgba(255, 255, 255, 0.08), transparent 28%),
    linear-gradient(180deg, #151515, #050505 76%) !important;
}

.layer-grid {
  background-size: 72px 72px !important;
  opacity: 0.26 !important;
}

.layer-tone {
  background-image: radial-gradient(circle, rgba(255,255,255,0.2) 1px, transparent 1.4px) !important;
  background-size: 10px 10px !important;
  opacity: 0.18 !important;
}

.layer-streaks {
  background: repeating-linear-gradient(118deg, transparent 0 30px, rgba(255,255,255,0.13) 30px 32px) !important;
  opacity: 0.36 !important;
}

.topbar {
  left: 24px !important;
  right: 24px !important;
  top: 20px !important;
  min-height: 82px !important;
  border-width: 5px !important;
  background:
    linear-gradient(110deg, transparent 0 72%, rgba(213, 19, 45, 0.11) 72% 73%, transparent 73%),
    #fffaf0 !important;
  box-shadow: 8px 8px 0 #050505 !important;
}

.brand span,
.kicker {
  box-shadow: 4px 4px 0 rgba(0,0,0,0.28), 6px 6px 0 var(--red) !important;
}

.brand h1 {
  font-family: Impact, "Arial Black", Arial, sans-serif !important;
  font-size: clamp(1.8rem, 3.8vw, 3.25rem) !important;
  letter-spacing: -0.065em !important;
}

.home-link,
.panel-link,
.meta span {
  border-width: 4px !important;
  box-shadow: 5px 5px 0 var(--ink) !important;
  transition: transform 160ms ease, box-shadow 160ms ease !important;
}

.home-link:hover,
.panel-link:hover {
  transform: translate(-3px, -3px) rotate(-0.6deg) !important;
  box-shadow: 8px 8px 0 var(--ink) !important;
}

.track {
  padding-top: 136px !important;
  gap: 26px !important;
}

.project-panel {
  flex-basis: min(66vw, 780px) !important;
  min-height: calc(100vh - 250px) !important;
  border-width: 6px !important;
  background:
    radial-gradient(circle at 85% 22%, rgba(213, 19, 45, 0.14), transparent 24%),
    repeating-linear-gradient(-36deg, transparent 0 18px, rgba(8, 8, 8, 0.11) 18px 20px),
    #fffaf0 !important;
  box-shadow: 12px 12px 0 rgba(0,0,0,0.82) !important;
}

.project-panel.hero-card {
  flex-basis: min(58vw, 720px) !important;
}

.project-panel h2 {
  font-family: Impact, "Arial Black", Arial, sans-serif !important;
  font-size: clamp(2.8rem, 6.3vw, 5.6rem) !important;
  letter-spacing: -0.075em !important;
  text-shadow: 5px 5px 0 rgba(8, 8, 8, 0.13) !important;
}

.project-panel p {
  font-family: Arial, Helvetica, sans-serif !important;
  font-weight: 900 !important;
}

.visual {
  border-width: 5px !important;
  box-shadow: inset 0 0 0 3px rgba(255,255,255,0.18) !important;
}

.visual::before {
  opacity: 0.48 !important;
}

.project-image::after {
  background:
    radial-gradient(circle at 50% 50%, transparent 38%, rgba(0, 0, 0, 0.32)),
    radial-gradient(circle, rgba(255,255,255,0.12) 1px, transparent 1.5px) !important;
  background-size: auto, 9px 9px !important;
}

.progress {
  height: 12px !important;
  border-width: 3px !important;
  box-shadow: 4px 4px 0 #050505 !important;
}

.hint {
  font-family: "Arial Black", Impact, Arial, sans-serif !important;
  letter-spacing: 0.02em !important;
  box-shadow: 4px 4px 0 rgba(0,0,0,0.5) !important;
}

html[data-theme="dark"] .topbar,
html[data-theme="dark"] .project-panel,
html[data-theme="dark"] .progress {
  background-color: #211d18 !important;
  color: #fff6e6 !important;
  border-color: #fff6e6 !important;
}

html[data-theme="dark"] .project-panel {
  background:
    radial-gradient(circle at 85% 22%, rgba(255, 51, 81, 0.18), transparent 24%),
    repeating-linear-gradient(-36deg, transparent 0 18px, rgba(255, 246, 230, 0.12) 18px 20px),
    #211d18 !important;
}

html[data-theme="dark"] .home-link,
html[data-theme="dark"] .meta span {
  background: #15120f !important;
  color: #fff6e6 !important;
  border-color: #fff6e6 !important;
}

@media (max-width: 760px) {
  .topbar {
    left: 14px !important;
    right: 14px !important;
  }

  .track {
    padding-top: 168px !important;
    gap: 18px !important;
  }

  .project-panel,
  .project-panel.hero-card {
    flex-basis: calc(92vw - 20px) !important;
    min-height: calc(100vh - 250px) !important;
  }
}

/* Portfolio page typography correction pass. */
.topbar,
.project-panel,
.project-panel * {
  overflow-wrap: anywhere;
  word-break: normal;
}

.brand h1,
.project-panel h2,
.visual strong {
  letter-spacing: -0.035em !important;
  line-height: 0.92 !important;
  text-wrap: balance;
}

.brand h1 {
  font-size: clamp(1.65rem, 3vw, 2.65rem) !important;
}

.project-panel h2 {
  font-size: clamp(2.8rem, 5.4vw, 4.8rem) !important;
}

.project-panel p {
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: clamp(0.98rem, 1.15vw, 1.1rem) !important;
  line-height: 1.55 !important;
  letter-spacing: 0 !important;
}

.brand span,
.kicker,
.meta span,
.panel-link,
.home-link,
.hint {
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: clamp(0.78rem, 0.95vw, 0.95rem) !important;
  font-weight: 900 !important;
  line-height: 1.05 !important;
  letter-spacing: 0.025em !important;
  white-space: normal !important;
  text-align: center !important;
}

.visual strong {
  font-size: clamp(1.8rem, 4vw, 3.3rem) !important;
}

@media (max-width: 760px) {
  .brand h1 {
    font-size: clamp(1.5rem, 8vw, 2.5rem) !important;
  }

  .project-panel h2 {
    font-size: clamp(2.35rem, 13vw, 3.8rem) !important;
    line-height: 0.96 !important;
  }
}

/* Portfolio archive heading readability correction. */
.brand h1,
.project-panel h2,
.visual strong {
  font-family: "Arial Black", Arial, Helvetica, sans-serif !important;
  letter-spacing: -0.018em !important;
  line-height: 0.98 !important;
  text-shadow: none !important;
}

.brand h1 {
  font-size: clamp(1.55rem, 2.6vw, 2.35rem) !important;
}

.project-panel h2 {
  font-size: clamp(2.55rem, 4.9vw, 4.45rem) !important;
}

.visual strong {
  font-size: clamp(1.7rem, 3.5vw, 3rem) !important;
}

@media (max-width: 760px) {
  .project-panel h2 {
    font-size: clamp(2.1rem, 11vw, 3.35rem) !important;
    line-height: 1.02 !important;
  }
}

/* Portfolio page contrast and heading wrap fix. */
.kicker,
.brand span,
html[data-theme="dark"] .kicker,
html[data-theme="dark"] .brand span {
  background: #050505 !important;
  color: #fffaf0 !important;
  border-color: #050505 !important;
}

.project-panel h2 {
  font-size: clamp(2.15rem, 4.1vw, 3.75rem) !important;
  line-height: 1.04 !important;
  letter-spacing: -0.012em !important;
  overflow-wrap: normal !important;
  word-break: keep-all !important;
  hyphens: none !important;
}

.project-panel:not(.hero-card) h2 {
  font-size: clamp(1.95rem, 3.6vw, 3.25rem) !important;
}

.project-panel {
  grid-template-columns: minmax(0, 0.9fr) minmax(240px, 1.1fr) !important;
}

.project-panel.hero-card,
.project-panel:has(.visual strong) {
  grid-template-columns: 1fr !important;
}

.project-panel p {
  max-width: 760px !important;
}

@media (max-width: 760px) {
  .project-panel,
  .project-panel.hero-card,
  .project-panel:has(.visual strong) {
    grid-template-columns: 1fr !important;
  }

  .project-panel h2,
  .project-panel:not(.hero-card) h2 {
    font-size: clamp(1.9rem, 9vw, 3rem) !important;
    line-height: 1.08 !important;
  }
}

/* =========================================================
   Manga archive motion system
   Lightweight transforms only; respects reduced motion.
   ========================================================= */
:root {
  --archive-motion-fast: 160ms;
  --archive-motion-card: 360ms;
  --archive-motion-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes archiveEnter {
  from { opacity: 0; transform: translateX(22px) scale(0.985); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes archiveTitleSlash {
  from { opacity: 0; transform: translateX(-18px); clip-path: inset(0 100% 0 0); }
  to { opacity: 1; transform: translateX(0); clip-path: inset(0 0 0 0); }
}

.topbar {
  animation: archiveEnter 520ms var(--archive-motion-ease) both;
}

.project-panel {
  animation: archiveEnter var(--archive-motion-card) var(--archive-motion-ease) both;
  transform-origin: center center;
  transition:
    transform var(--archive-motion-fast) var(--archive-motion-ease),
    box-shadow var(--archive-motion-fast) var(--archive-motion-ease),
    border-color var(--archive-motion-fast) ease;
  will-change: transform;
}

.project-panel:nth-child(2) { animation-delay: 80ms; }
.project-panel:nth-child(3) { animation-delay: 120ms; }
.project-panel:nth-child(4) { animation-delay: 160ms; }

.project-panel h2,
.project-panel .kicker {
  animation: archiveTitleSlash 430ms var(--archive-motion-ease) 110ms both;
}

.project-panel:hover {
  transform: translateY(-8px) rotate(-0.35deg) scale(1.01) !important;
  box-shadow: 16px 16px 0 rgba(0,0,0,0.86) !important;
}

.project-panel::after {
  content: "";
  position: absolute;
  inset: -2px;
  opacity: 0;
  pointer-events: none;
  background:
    radial-gradient(circle, rgba(255,255,255,0.16) 1px, transparent 1.5px),
    repeating-linear-gradient(112deg, transparent 0 20px, rgba(255,255,255,0.14) 20px 22px);
  background-size: 9px 9px, auto;
  transition: opacity var(--archive-motion-fast) ease;
  mix-blend-mode: screen;
}

.project-panel:hover::after {
  opacity: 0.62;
}

.panel-link:hover,
.home-link:hover,
.meta span:hover {
  transform: translate(-3px, -3px) scale(1.02) !important;
}

.project-thumb {
  transition: transform 260ms var(--archive-motion-ease), filter 260ms ease;
  will-change: transform;
}

.project-panel:hover .project-thumb {
  transform: scale(1.035);
  filter: contrast(1.08) brightness(1.04);
}

@media (hover: none) {
  .project-panel:hover,
  .panel-link:hover,
  .home-link:hover,
  .meta span:hover,
  .project-panel:hover .project-thumb {
    transform: none !important;
    filter: none !important;
  }

  .project-panel:hover::after {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }

  .project-panel,
  .project-panel:hover,
  .project-thumb,
  .project-panel:hover .project-thumb {
    transform: none !important;
    filter: none !important;
  }
}
/* Keep portfolio category badges readable in every theme. */
.project-panel .kicker,
html[data-theme="light"] .project-panel .kicker,
html[data-theme="dark"] .project-panel .kicker {
  background: #050505 !important;
  color: #fffdf5 !important;
  -webkit-text-fill-color: #fffdf5 !important;
  text-shadow: none !important;
  border-color: #050505 !important;
}

/* Hide the old scroll hint box and force wheel movement into the horizontal archive. */
html,
body {
  overflow: hidden !important;
  overscroll-behavior: none !important;
}

.h-scroll {
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scrollbar-width: none !important;
  overscroll-behavior: contain !important;
}

.h-scroll::-webkit-scrollbar {
  display: none !important;
}

.hint {
  display: none !important;
}

/* Public archive top navigation actions. */
.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
}

.topbar-actions form {
  margin: 0;
}

.topbar-actions .home-link {
  font-family: Arial, Helvetica, sans-serif !important;
  font-weight: 900 !important;
  text-transform: uppercase !important;
  cursor: pointer;
}

/* Performance and accessibility finishing layer. */
.home-link:focus-visible,
.panel-link:focus-visible,
.meta span:focus-visible {
  outline: 4px solid var(--red, #c9182b) !important;
  outline-offset: 5px !important;
}

.project-thumb {
  backface-visibility: hidden;
  transform: translateZ(0);
}
