* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --color-blue-purple: #3f2fe3;
  --color-red-pink: #df1f68;
  --color-burgundy: #93123c;
  --bg-color: var(--color-blue-purple);
  --text-color: #000000;
  --plain-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  --font-helvetica: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-verdana: Verdana, Geneva, sans-serif;
}

#p5_loading,
#defaultCanvas0,
canvas.p5Canvas,
canvas:not(#pixels-fighting-canvas):not(#conway-canvas) {
  display: none !important;
  position: absolute !important;
  width: 0 !important;
  height: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-helvetica);
  font-weight: 500;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  transition: background-color 0.35s ease, color 0.35s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 6vw 5vw;
  gap: 2.5rem;
}

.logo-container,
.name-container {
  order: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  z-index: 10;
  user-select: none;
  margin: 0.5rem auto 0 auto;
}

#cutout-board {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  justify-content: center;
  transform: scale(0.74);
  transform-origin: top center;
}

.word-group {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  flex-wrap: nowrap;
}

.nav-container {
  order: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  z-index: 20;
  margin: auto 0;
  text-align: center;
}

.arc-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.35rem;
  padding: 10px 0;
  width: 100%;
  text-align: center;
  touch-action: pan-y;
}

.arc-item {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  text-align: center;
  transform: translateX(var(--arc-offset, 0px)) scale(var(--item-scale, 1));
  opacity: var(--item-opacity, 1);
  transform-origin: center center;
  transition: none;
  will-change: transform, opacity;
}

.arc-item:nth-child(1) { --arc-offset: 0px; --me-tilt: -1.8deg; }
.arc-item:nth-child(2) { --arc-offset: 0px; --me-tilt: 1.5deg; }
.arc-item:nth-child(3) { --arc-offset: 0px; --me-tilt: -1.2deg; }
.arc-item:nth-child(4) { --arc-offset: 0px; --me-tilt: 1.8deg; }

.arc-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-color);
  text-decoration: none;
  font-size: var(--item-font-size, clamp(1.85rem, 6.2vw, 2.6rem));
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.15;
  user-select: none;
  cursor: pointer;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
  transition: none;
  z-index: 1;
}

.arc-link::before,
.project-title-btn::before,
.back-link::before {
  content: '';
  position: absolute;
  inset: -0.1em -0.35em;
  z-index: -1;
  pointer-events: none;
  display: none;
  transform: rotate(var(--me-tilt, -1.5deg));
  transform-origin: center center;
  transition: none;
}

.project-title-btn,
.back-link {
  position: relative;
  z-index: 1;
}

.theme-me-red .arc-item:hover .arc-link,
.theme-me-red .arc-item.is-hovered .arc-link,
.theme-me-red .project-title-btn:hover,
.theme-me-red .back-link:hover {
  color: #ea1d25 !important;
}
.theme-me-red .arc-item:hover .arc-link::before,
.theme-me-red .arc-item.is-hovered .arc-link::before,
.theme-me-red .project-title-btn:hover::before,
.theme-me-red .back-link:hover::before {
  display: block;
  background-color: #ffffff;
}

.theme-me-white .arc-item:hover .arc-link,
.theme-me-white .arc-item.is-hovered .arc-link,
.theme-me-white .project-title-btn:hover,
.theme-me-white .back-link:hover {
  color: #ffffff !important;
}
.theme-me-white .arc-item:hover .arc-link::before,
.theme-me-white .arc-item.is-hovered .arc-link::before,
.theme-me-white .project-title-btn:hover::before,
.theme-me-white .back-link:hover::before {
  display: block;
  background-color: #ea1d25;
}

.theme-white-blue .arc-item:hover .arc-link,
.theme-white-blue .arc-item.is-hovered .arc-link,
.theme-white-blue .project-title-btn:hover,
.theme-white-blue .back-link:hover {
  color: #ffffff !important;
}
.theme-white-blue .arc-item:hover .arc-link::before,
.theme-white-blue .arc-item.is-hovered .arc-link::before,
.theme-white-blue .project-title-btn:hover::before,
.theme-white-blue .back-link:hover::before {
  display: block;
  background-color: #0044ee;
}

.theme-blue-black .arc-item:hover .arc-link,
.theme-blue-black .arc-item.is-hovered .arc-link,
.theme-blue-black .project-title-btn:hover,
.theme-blue-black .back-link:hover {
  color: #002b66 !important;
}
.theme-blue-black .arc-item:hover .arc-link::before,
.theme-blue-black .arc-item.is-hovered .arc-link::before,
.theme-blue-black .project-title-btn:hover::before,
.theme-blue-black .back-link:hover::before {
  display: block;
  background-color: #000000;
}

.theme-black-yellow .arc-item:hover .arc-link,
.theme-black-yellow .arc-item.is-hovered .arc-link,
.theme-black-yellow .project-title-btn:hover,
.theme-black-yellow .back-link:hover {
  color: #000000 !important;
}
.theme-black-yellow .arc-item:hover .arc-link::before,
.theme-black-yellow .arc-item.is-hovered .arc-link::before,
.theme-black-yellow .project-title-btn:hover::before,
.theme-black-yellow .back-link:hover::before {
  display: block;
  background-color: #ffee00;
}

.theme-black-cyan .arc-item:hover .arc-link,
.theme-black-cyan .arc-item.is-hovered .arc-link,
.theme-black-cyan .project-title-btn:hover,
.theme-black-cyan .back-link:hover {
  color: #000000 !important;
}
.theme-black-cyan .arc-item:hover .arc-link::before,
.theme-black-cyan .arc-item.is-hovered .arc-link::before,
.theme-black-cyan .project-title-btn:hover::before,
.theme-black-cyan .back-link:hover::before {
  display: block;
  background-color: #00ffff;
}

.lock-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6em;
  opacity: 0.85;
  transform: translateY(-0.06em);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.lock-svg {
  width: 0.72em;
  height: 0.72em;
  fill: currentColor;
}

@media (min-width: 860px) {
  body {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 4vw 7vw;
    gap: 0;
  }

  .nav-container {
    order: 1;
    width: auto;
    margin: 0;
    margin-right: auto;
    flex-shrink: 0;
    align-items: flex-start;
    text-align: left;
  }

  .arc-menu {
    gap: clamp(1.3rem, 3.0vh, 2.1rem);
    padding: 15px 0;
    align-items: flex-start;
    text-align: left;
    width: auto;
  }

  .arc-item {
    display: block;
    width: auto;
    text-align: left;
    transform-origin: left center;
  }

  .arc-item:nth-child(1) { --arc-offset: 0px; }
  .arc-item:nth-child(2) { --arc-offset: 56px; }
  .arc-item:nth-child(3) { --arc-offset: 56px; }
  .arc-item:nth-child(4) { --arc-offset: 0px; }

  .arc-link {
    justify-content: flex-start;
    text-align: left;
    gap: 10px;
    font-size: var(--item-font-size, clamp(2.4rem, 4.4vw, 3.8rem));
    line-height: 1.1;
  }

  .name-container,
  .logo-container {
    order: 2;
    align-items: flex-end;
    width: auto;
    margin: 0;
    margin-left: auto;
    flex-shrink: 0;
  }

  #cutout-board {
    gap: 14px;
    align-items: flex-end;
    transform: none;
    transform-origin: right center;
  }

  .word-group {
    gap: 6px;
    justify-content: flex-end;
  }
}

.tile {
  position: relative;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 6px 9px;
  min-width: 36px;
  min-height: 46px;
  cursor: pointer;
  user-select: none;
  transition: none !important;
}

@media (min-width: 860px) {
  .tile {
    padding: 8px 12px;
    min-width: 42px;
    min-height: 52px;
  }
}

.char {
  display: inline-block;
  line-height: 0.95;
  z-index: 3;
  pointer-events: none;
  transition: none !important;
}

.tile.plain-letter {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  clip-path: none !important;
  padding: 3px 5px !important;
  min-width: auto !important;
  min-height: auto !important;
  transform: none !important;
}
.tile.plain-letter::before,
.tile.plain-letter::after {
  display: none !important;
}

.font-verdana {
  font-family: var(--font-verdana) !important;
  font-weight: 400;
  color: var(--text-color) !important;
  letter-spacing: -0.5px;
  text-shadow: var(--plain-shadow, 0 1px 3px rgba(0, 0, 0, 0.3));
}
.font-helvetica {
  font-family: var(--font-helvetica) !important;
  font-weight: 700;
  color: var(--text-color) !important;
  letter-spacing: -0.2px;
  text-shadow: var(--plain-shadow, 0 1px 3px rgba(0, 0, 0, 0.3));
}

.material-fabric {
  box-shadow: 1px 3px 6px rgba(0, 0, 0, 0.35);
  border-radius: 1px;
}

.fabric-linen {
  background-color: #d9d3c5;
  background-image:
    radial-gradient(#b0a997 0.75px, transparent 0.75px),
    repeating-linear-gradient(0deg, rgba(80,70,55,0.04) 0px, rgba(80,70,55,0.04) 1px, transparent 1px, transparent 3px),
    repeating-linear-gradient(90deg, rgba(80,70,55,0.04) 0px, rgba(80,70,55,0.04) 1px, transparent 1px, transparent 3px);
  background-size: 3px 3px, 4px 4px, 4px 4px;
  border: 1px dashed rgba(85, 75, 60, 0.4);
  color: #2b261f;
}

.fabric-ticking {
  background-color: #eae6df;
  background-image: repeating-linear-gradient(
    90deg,
    #35485e 0px, #35485e 3px,
    transparent 3px, transparent 6px,
    #35485e 6px, #35485e 9px,
    transparent 9px, transparent 20px
  );
  border: 1px solid rgba(40,55,70,0.3);
  color: #121820;
}

.fabric-houndstooth {
  background:
    linear-gradient(45deg, #222 25%, transparent 25%),
    linear-gradient(-45deg, #222 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #222 75%),
    linear-gradient(-45deg, transparent 75%, #222 75%);
  background-size: 8px 8px;
  background-position: 0 0, 0 4px, 4px -4px, -4px 0px;
  background-color: #8c765c;
  color: #f6eedb;
  border: 1px solid #1a1a1a;
}

.fabric-sashiko {
  background-color: #1e293b;
  background-image:
    radial-gradient(#e2e8f0 1.2px, transparent 1.2px),
    radial-gradient(#94a3b8 0.8px, transparent 0.8px);
  background-size: 10px 10px;
  background-position: 0 0, 5px 5px;
  border: 1px dashed rgba(255,255,255,0.45);
  color: #f8fafc;
}

.fabric-canvas {
  background-color: #555b42;
  background-image:
    repeating-linear-gradient(45deg, rgba(0,0,0,0.06) 0px, rgba(0,0,0,0.06) 2px, transparent 2px, transparent 4px),
    repeating-linear-gradient(-45deg, rgba(255,255,255,0.05) 0px, rgba(255,255,255,0.05) 2px, transparent 2px, transparent 4px);
  border: 1.5px solid #3c402d;
  color: #ede8d0;
}

.fabric-herringbone {
  background-color: #4a4d52;
  background-image:
    repeating-linear-gradient(45deg, #2f3237 0px, #2f3237 3px, #5b5e65 3px, #5b5e65 6px),
    repeating-linear-gradient(-45deg, #2f3237 0px, #2f3237 3px, #5b5e65 3px, #5b5e65 6px);
  background-size: 12px 12px;
  border: 1px solid #232527;
  color: #ffffff;
}

.fabric-jersey {
  background-color: #9ca3af;
  background-image: repeating-linear-gradient(
    90deg,
    rgba(0,0,0,0.1) 0px, rgba(0,0,0,0.1) 2px,
    rgba(255,255,255,0.15) 2px, rgba(255,255,255,0.15) 4px
  );
  border: 1px solid #6b7280;
  color: #111827;
}

.fabric-frayed::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 4px;
  right: 4px;
  height: 3px;
  background: repeating-linear-gradient(90deg, #d4cebe 0, #d4cebe 2px, transparent 2px, transparent 4px);
  opacity: 0.7;
  pointer-events: none;
}

.material-paper {
  box-shadow: 2px 3px 6px rgba(0, 0, 0, 0.35);
}

.paper-newsprint-aged {
  background-color: #ede2c8;
  background-image: radial-gradient(rgba(0,0,0,0.06) 1px, transparent 0);
  background-size: 3px 3px;
  color: #1c1917;
}

.paper-inverted-ink {
  background-color: #111315;
  background-image: linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 100% 3px;
  color: #f4f4f5;
}

.paper-halftone {
  background-color: #faf7ee;
  background-image: radial-gradient(#1e293b 1px, transparent 1px);
  background-size: 4px 4px;
  color: #0f172a;
  border-left: 2px solid #e11d48;
}

.paper-ledger {
  background-color: #e6ede6;
  background-image:
    linear-gradient(#c2d4c2 1px, transparent 1px),
    linear-gradient(90deg, #c2d4c2 1px, transparent 1px);
  background-size: 8px 8px;
  color: #142817;
}

.paper-manila {
  background-color: #d6b87a;
  background-image: linear-gradient(135deg, rgba(255,255,255,0.15), rgba(0,0,0,0.08));
  color: #271e0c;
}

.paper-classifieds {
  background-color: #f7e04d;
  color: #050505;
}

.paper-bookplate {
  background-color: #fdfbf7;
  border: 1px solid #dcd7cb;
  color: #262421;
}

.has-tape::before {
  content: '';
  position: absolute;
  top: -7px;
  left: 20%;
  width: 26px;
  height: 11px;
  background: rgba(255, 255, 235, 0.42);
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
  transform: rotate(-4deg);
  backdrop-filter: blur(1px);
  border: 1px solid rgba(255,255,255,0.25);
  z-index: 10;
  pointer-events: none;
}

.has-staple::before {
  content: '';
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 3px;
  background: #8b929a;
  box-shadow: 0 1px 2px rgba(0,0,0,0.5), inset 0 0 1px #fff;
  border-radius: 1px;
  z-index: 10;
  pointer-events: none;
}

.tear-1 { clip-path: polygon(3% 1%, 98% 3%, 97% 96%, 1% 98%); }
.tear-2 { clip-path: polygon(2% 4%, 96% 0%, 100% 95%, 4% 97%); }
.tear-3 { clip-path: polygon(0% 1%, 100% 3%, 97% 98%, 2% 95%); }
.tear-4 { clip-path: polygon(3% 0%, 98% 2%, 99% 100%, 1% 97%); }

.page-container {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.back-link {
  display: inline-block;
  color: var(--text-color);
  text-decoration: none;
  font-size: 1.15rem;
  font-weight: 500;
  margin-bottom: 2.5rem;
  transition: none;
}

.back-link:hover {
  opacity: 1;
}

.page-title {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  margin-bottom: 1.8rem;
  line-height: 1.1;
  display: flex;
  align-items: center;
  gap: 12px;
}

.page-content {
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  line-height: 1.6;
  max-width: 680px;
}

.page-content p {
  margin-bottom: 1.5rem;
}

.page-content a {
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.contact-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 1.5rem;
}

.copy-email-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid var(--text-color);
  color: var(--text-color);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 3px;
  cursor: pointer;
  vertical-align: middle;
  line-height: 1;
  transition: none !important;
  user-select: none;
}

.copy-email-btn:hover,
.copy-email-btn.copied {
  background-color: var(--text-color);
  color: var(--bg-color);
  transition: none !important;
}

.copy-icon {
  display: inline-block;
  vertical-align: middle;
  transition: none !important;
}

.copy-text {
  font-family: inherit;
  font-size: 0.82rem;
  letter-spacing: -0.01em;
  transition: none !important;
}

.autobio-page-container {
  max-width: 1060px;
}

.autobio-layout {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: clamp(2rem, 3.5vw, 3.5rem);
  position: relative;
}

.autobio-page-container .page-title {
  font-size: clamp(2.6rem, 6.5vw, 4.4rem);
}

.autobio-content {
  flex: 1;
  min-width: 0;
  max-width: 860px !important;
  font-size: clamp(1.18rem, 2.4vw, 1.48rem) !important;
  line-height: 1.68;
}

.autobio-intro {
  margin-bottom: clamp(2.5rem, 5vh, 4rem);
  max-width: 720px;
  font-size: clamp(1.18rem, 2.4vw, 1.48rem) !important;
  line-height: 1.68;
}

.autobio-intro p,
.chapter-body p {
  font-size: clamp(1.18rem, 2.4vw, 1.48rem) !important;
  line-height: 1.68;
  margin-bottom: 1.65rem;
}

.chapter-section {
  display: flex;
  align-items: flex-start;
  gap: clamp(1.8rem, 3.5vw, 3rem);
  margin-top: clamp(3.2rem, 6vh, 4.8rem);
  scroll-margin-top: 2.5rem;
}

.chapter-header {
  width: clamp(140px, 20vw, 185px);
  flex-shrink: 0;
  text-align: left;
}

.chapter-header h1 {
  font-family: var(--font-helvetica);
  font-size: clamp(2.6rem, 5vw, 3.8rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin: 0 0 0.45rem 0;
  text-align: left;
  color: var(--text-color);
}

.chapter-header h2 {
  font-family: var(--font-helvetica);
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 0;
  text-align: left;
  color: var(--text-color);
  opacity: 0.85;
}

.chapter-body {
  flex: 1;
  min-width: 0;
  max-width: 660px;
  font-size: clamp(1.18rem, 2.4vw, 1.48rem) !important;
  line-height: 1.68;
}

.autobio-closing-title {
  display: inline;
  font-size: 1.25em;
  line-height: inherit;
  margin: 0;
}

.chapter-body p:last-child {
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .chapter-section {
    flex-direction: column;
    gap: 1.1rem;
    margin-top: 2.8rem;
  }

  .chapter-header {
    width: 100%;
  }

  .chapter-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.25rem;
  }

  .chapter-header h2 {
    font-size: 1.2rem;
  }

  .chapter-body {
    max-width: 100%;
  }
}

.life-gallery-section {
  margin: clamp(4.5rem, 14vh, 9rem) auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 320px;
  text-align: center;
}

.blended-input-wrapper {
  width: 100%;
  max-width: 320px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
  text-align: center;
}

.blended-input {
  width: 100%;
  max-width: 280px;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  color: var(--text-color);
  font-family: var(--font-helvetica);
  font-weight: 500;
  font-size: clamp(2rem, 5.5vw, 2.7rem);
  letter-spacing: 0.25em;
  padding: 8px 0;
  padding-left: 0.25em;
  margin: 0 auto;
  text-align: center;
  caret-color: var(--text-color);
  user-select: text;
  display: block;
}

.password-toggle-btn {
  position: absolute;
  right: -10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: var(--text-color);
  opacity: 0.45;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease, transform 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.password-toggle-btn:hover {
  opacity: 0.95;
  transform: translateY(-50%) scale(1.08);
}

.password-toggle-btn:focus-visible {
  opacity: 1;
  outline: 2px solid var(--text-color);
  outline-offset: 2px;
  border-radius: 4px;
}

.eye-icon {
  width: 22px;
  height: 22px;
  stroke: currentColor;
}

.blended-input::placeholder {
  color: var(--text-color);
  opacity: 0.35;
  letter-spacing: normal;
  padding-left: 0;
  font-size: 1.15rem;
  text-align: center;
}

.corndog-container {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  pointer-events: none;
  user-select: none;
}

#conway-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  user-select: none;
}

#pixels-fighting-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  user-select: none;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  opacity: 0.35;
}

body.corndog-active .corndog-container {
  display: block;
}

.corndog-img {
  display: block;
  width: min(480px, 80vw);
  max-height: 75vh;
  height: auto;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  pointer-events: none;
  margin: 0 auto;
}

.center-loading {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-helvetica);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  z-index: 9999;
  user-select: none;
}

html.loading-archive #lock-screen {
  display: none;
}

html.loading-archive .center-loading {
  display: flex;
}

.archive-screen {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  display: none;
  flex-direction: column;
  gap: 2rem;
}

.archive-header {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding-bottom: 0.5rem;
  opacity: 0.95;
}

.archive-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.archive-path-wrap {
  display: flex;
  align-items: center;
  min-width: 0;
}

.archive-path {
  font-size: clamp(1.8rem, 4.5vw, 2.6rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.2;
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.35em;
  margin: 0;
}

.path-seg {
  color: var(--text-color);
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  cursor: pointer;
  opacity: 0.65;
  transition: none !important;
}

.path-seg:hover {
  opacity: 1;
  text-decoration: none;
  transition: none !important;
}

.path-seg.path-current {
  opacity: 1;
  cursor: default;
  text-decoration: none;
  transition: none !important;
}

.path-sep {
  opacity: 0.35;
  user-select: none;
  font-weight: 400;
}

.archive-actions-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.view-mode-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  border: none;
  padding: 2px 0;
}

.view-mode-btn {
  background: none;
  border: none;
  color: var(--text-color);
  font-family: var(--font-helvetica);
  font-size: 0.85rem;
  padding: 3px 6px;
  cursor: pointer;
  opacity: 0.45;
  transition: none;
  user-select: none;
  text-decoration: none;
}

.view-mode-btn:hover {
  opacity: 0.85;
}

.view-mode-btn.active {
  opacity: 1;
  font-weight: 700;
  text-decoration: none;
}

.download-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--text-color);
  font-family: var(--font-helvetica);
  font-size: 0.85rem;
  padding: 4px 6px;
  cursor: pointer;
  opacity: 0.75;
  transition: none !important;
  user-select: none;
}

.download-all-btn:hover {
  opacity: 1;
  transition: none !important;
}

.download-all-label,
#download-all-label {
  transition: none !important;
}

.archive-file-list {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 8px;
  border-bottom: none;
  cursor: pointer;
  transition: none;
  gap: 12px;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  text-align: left;
  background: transparent;
  border: none;
  width: 100%;
}

.file-row:focus-visible,
.pane-card:focus-visible,
.path-seg:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

button.pane-card {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  text-align: left;
  width: 100%;
}

.file-row:hover {
  background: rgba(128, 128, 128, 0.1);
}

.file-row.is-directory {
  font-weight: 500;
}

.file-row.is-directory:hover {
  background: rgba(128, 128, 128, 0.12);
}

.file-row.is-parent-dir {
  opacity: 0.85;
}

.file-row.is-parent-dir:hover {
  opacity: 1;
}

.file-main-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.file-icon-badge {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 2px 6px;
  border: 1px solid currentColor;
  opacity: 0.65;
  text-transform: uppercase;
  flex-shrink: 0;
}

.file-enter-arrow {
  font-size: 1rem;
  opacity: 0.45;
  transition: none;
}

.file-row:hover .file-enter-arrow {
  opacity: 1;
}

.file-name {
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.file-size {
  font-size: 0.9rem;
  opacity: 0.5;
}

.file-dl-link {
  color: inherit;
  opacity: 0.6;
  display: inline-flex;
  align-items: center;
  padding: 4px;
  transition: none;
  background: none;
  border: none;
  cursor: pointer;
}

.file-dl-link:hover {
  opacity: 1;
}

.archive-panes-grid {
  display: none;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  width: 100%;
}

.pane-card {
  position: relative;
  border: 1px solid currentColor;
  background: rgba(128, 128, 128, 0.06);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  overflow: hidden;
  transition: none;
}

.pane-card:hover {
  background: rgba(128, 128, 128, 0.12);
}

.pane-card.is-directory-card .pane-thumb-wrap {
  background: rgba(128, 128, 128, 0.12);
  color: var(--text-color);
  opacity: 0.8;
  transition: none;
}

.pane-card.is-directory-card:hover .pane-thumb-wrap {
  opacity: 1;
}

.pane-folder-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: none;
}

.pane-card.is-directory-card:hover .pane-folder-icon {
  transform: none;
}

.pane-thumb-wrap {
  width: 100%;
  height: 155px;
  background: rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.pane-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pane-video-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 2px 6px;
  font-size: 0.75rem;
  border-radius: 2px;
}

.pane-audio-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(128, 128, 128, 0.12);
  color: var(--text-color);
  opacity: 0.75;
  transition: none;
}

.pane-card:hover .pane-audio-wrap {
  opacity: 1;
}

.babel-audio-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.5rem;
  color: var(--text-color);
  gap: 1.25rem;
}

.pane-info {
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid rgba(128, 128, 128, 0.2);
}

.pane-name {
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.archive-babel-view {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 1.25rem;
  padding: 0.5rem 0;
}

.babel-stage-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: clamp(8px, 2.5vw, 24px);
  position: relative;
}

.babel-nav-arrow {
  background: none;
  border: none;
  color: var(--text-color);
  padding: 10px;
  cursor: pointer;
  opacity: 0.45;
  transition: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  flex-shrink: 0;
}

.babel-nav-arrow:hover {
  opacity: 1;
}

.babel-nav-arrow:active {
  opacity: 0.8;
}

.babel-stage {
  flex: 1;
  width: 100%;
  max-width: 720px;
  min-height: 380px;
  max-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid currentColor;
  position: relative;
  overflow: hidden;
}

.babel-media {
  max-width: 100%;
  max-height: 58vh;
  object-fit: contain;
}

.babel-dots-array {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 520px;
  margin: 0 auto;
  padding: 8px;
}

.babel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.28;
  cursor: pointer;
  border: none;
  padding: 0;
  transition: none;
}

.babel-dot:hover {
  opacity: 0.85;
  transform: none;
}

.babel-dot.active {
  opacity: 1;
  transform: scale(1.4);
}

.babel-hover-title {
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  min-height: 1.5em;
  text-align: center;
  opacity: 0.85;
}

.stream-loader {
  font-family: var(--font-helvetica);
  font-size: 0.85rem;
  opacity: 0.45;
  padding: 12px 8px;
  user-select: none;
  font-style: italic;
}

.media-loading-state,
.stage-loading-state {
  font-family: var(--font-helvetica);
  font-size: 1.15rem;
  font-weight: 500;
  opacity: 0.65;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.media-dim-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.93);
  z-index: 99999;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2vw;
  backdrop-filter: blur(10px);
}

.media-dim-content {
  position: relative;
  max-width: 90vw;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.media-display-elem {
  max-width: 90vw;
  max-height: 72vh;
  object-fit: contain;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.media-overlay-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 760px;
  margin-top: 14px;
  color: #ffffff;
  gap: 16px;
}

.media-overlay-title {
  font-size: 1.1rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.media-overlay-controls {
  display: flex;
  align-items: center;
  gap: 14px;
}

.media-ctrl-btn {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #ffffff;
  padding: 5px 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.9rem;
  opacity: 0.8;
  transition: opacity 0.15s ease;
}

.media-ctrl-btn:hover {
  opacity: 1;
  border-color: #ffffff;
}

.media-progress-container {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 760px;
  margin-top: 14px;
  gap: 12px;
  color: #ffffff;
}

.media-time {
  font-family: monospace, var(--font-helvetica);
  font-size: 0.85rem;
  opacity: 0.85;
  min-width: 44px;
  user-select: none;
}

.media-time-elapsed {
  text-align: right;
}

.media-time-remaining {
  text-align: left;
}

.video-progress-wrap {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.25);
  cursor: pointer;
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  transition: height 0.15s ease, background 0.15s ease;
}

.video-progress-wrap:hover {
  height: 10px;
  background: rgba(255, 255, 255, 0.35);
}

.video-progress-fill {
  height: 100%;
  background: #ffffff;
  width: 0%;
  pointer-events: none;
  border-radius: 4px;
}

.media-audio-card {
  width: 80vw;
  max-width: 520px;
  min-height: 220px;
  background: rgba(20, 20, 20, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 2rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
  color: #ffffff;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease;
  gap: 1.25rem;
}

.media-audio-card:hover {
  border-color: rgba(255, 255, 255, 0.45);
}

.audio-card-disc {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.85;
  transition: transform 0.3s ease;
}

.media-audio-card.is-playing .audio-card-disc {
  animation: spinDisc 8s linear infinite;
}

@keyframes spinDisc {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.audio-card-details {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.audio-card-badge {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  opacity: 0.7;
}

.audio-card-title {
  font-size: 1.2rem;
  font-weight: 500;
  word-break: break-word;
}

.audio-card-size {
  font-size: 0.85rem;
  opacity: 0.55;
}

.passcode-error-msg {
  color: var(--text-color);
  opacity: 0.75;
  font-size: 0.95rem;
  margin-top: 10px;
  min-height: 1.4em;
  text-align: center;
}

.projects-page-container {
  max-width: min(1440px, 94vw);
  width: 100%;
}

.projects-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  margin-top: 2.5rem;
  margin-bottom: 6rem;
  position: relative;
}

.project-item {
  width: auto;
  align-self: flex-start;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 24px);
  max-width: 100%;
  margin-bottom: clamp(5rem, 11vh, 9rem);
}

.project-title-btn {
  font-family: var(--font-helvetica);
  font-size: clamp(1.75rem, 3.8vw, 2.4rem);
  font-weight: 500;
  color: var(--text-color);
  cursor: pointer;
  display: inline-block;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  background: none;
  border: none;
  padding: 0;
  text-align: left;
  letter-spacing: -0.02em;
  flex-shrink: 0;
  transform: none;
}

.project-title-btn:hover {
  opacity: 1;
}

.project-details,
.project-details[hidden],
.project-item:not(.is-open) .project-details {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  height: 0 !important;
  max-height: 0 !important;
  width: 0 !important;
  max-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
  clip-path: inset(50%) !important;
  transform: scale(0) !important;
  -webkit-transform: scale(0) !important;
}

.project-item:not(.is-open) {
  gap: 0 !important;
}

.project-item:not(.is-open) .branch-row,
.project-item:not(.is-open) .branch-val,
.project-item:not(.is-open) .branch-connector,
.project-item:not(.is-open) .branch-dash {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  height: 0 !important;
  max-height: 0 !important;
  width: 0 !important;
  max-width: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
  transform: none !important;
  -webkit-transform: none !important;
}

.project-item.is-open {
  gap: clamp(14px, 2vw, 24px);
}

.project-item.is-open .project-details {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
  max-height: none !important;
  width: auto !important;
  max-width: 100% !important;
  overflow: visible !important;
  pointer-events: auto !important;
  clip-path: none !important;
  transform: none !important;
  -webkit-transform: none !important;
  margin-top: 0;
  padding-left: 0;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.project-item.is-open .branch-row {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
  width: auto !important;
  overflow: visible !important;
  pointer-events: auto !important;
}

.project-item.is-open .branch-val {
  display: inline-block;
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
  width: auto !important;
  overflow: visible !important;
  pointer-events: auto !important;
}

.branch-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  line-height: 1.45;
  font-size: clamp(1.15rem, 2.2vw, 1.4rem);
}

.branch-connector {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: 48px;
  height: 1.45em;
  flex-shrink: 0;
  user-select: none;
  color: var(--text-color);
}

.branch-dash {
  display: block;
  height: 3px;
  background-color: var(--text-color);
  border-radius: 1px;
  flex-shrink: 0;
}

.dash-diag-up {
  width: 50px;
  transform: rotate(-13deg);
  -webkit-transform: rotate(-13deg);
  transform-origin: left center;
}

.dash-straight {
  width: 46px;
  transform: rotate(0deg);
  -webkit-transform: rotate(0deg);
}

.dash-diag-down {
  width: 50px;
  transform: rotate(13deg);
  -webkit-transform: rotate(13deg);
  transform-origin: left center;
}

.branch-val {
  color: var(--text-color);
  word-break: break-word;
}

.project-item.is-open .branch-row:first-child .branch-val {
  transform: translateY(-10px);
  -webkit-transform: translateY(-10px);
}

.project-item.is-open .branch-row:last-child .branch-val {
  transform: translateY(10px);
  -webkit-transform: translateY(10px);
}

.branch-link {
  color: var(--text-color);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.branch-link:hover {
  opacity: 1;
}

.projects-scroll-arrow {
  position: fixed;
  right: clamp(1.2rem, 3.5vw, 3.2rem);
  bottom: clamp(1.8rem, 5vh, 3.8rem);
  z-index: 50;
  color: var(--text-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  animation: projectArrowBlink 1s infinite;
}

.scroll-arrow-svg {
  width: clamp(28px, 3.4vw, 40px);
  height: clamp(41px, 5.0vw, 58px);
  display: block;
}

@keyframes projectArrowBlink {
  0%, 49.99% {
    opacity: 1;
    visibility: visible;
  }
  50%, 100% {
    opacity: 0;
    visibility: hidden;
  }
}

.projects-scroll-arrow.arrow-hidden {
  display: none !important;
}
