:root {
  color-scheme: light;
  --bg: #d70b22;
  --glass: rgba(255, 255, 255, 0.22);
  --glass-soft: rgba(255, 255, 255, 0.14);
  --glass-strong: rgba(255, 255, 255, 0.34);
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.9);
  --card-text: #ffffff;
  --card-muted: rgba(255, 255, 255, 0.78);
  --line: rgba(255, 255, 255, 0.32);
  --red: #ef1d36;
  --red-dark: #9b0019;
  --purple: #5b2ac8;
  --violet-dark: #251044;
  --supercircle: 36%;
  --superpanel: 24px;
  --superpanel-lg: 34px;
  --superpill: 18px;
  --superpill-sm: 14px;
  --supermedia: 16px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --control-h: 42px;
  --control-h-sm: 40px;
  --control-pad-x: 14px;
  --side-control-w: 120px;
  --nav-w: 520px;
  --shadow: 0 18px 54px rgba(150, 0, 28, 0.26);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: #c90020;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  isolation: isolate;
  background:
    linear-gradient(135deg, #d30024 0%, #ef1834 46%, #a9001d 100%);
  color: var(--text);
  font-family: Nunito, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-align: center;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(to bottom, rgba(255, 0, 43, 0), rgba(92, 0, 18, 0.2));
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 30;
  width: 100%;
  height: 3px;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, #ffffff, #c69bff 46%, #da5864);
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.4);
}

a {
  color: inherit;
}

button,
select,
input,
textarea {
  font: inherit;
}

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

#liquid-canvas {
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
}

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

.topbar {
  position: sticky;
  top: 10px;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(var(--side-control-w), 1fr) minmax(420px, var(--nav-w)) minmax(var(--side-control-w), 1fr);
  align-items: center;
  gap: 0;
  width: min(960px, calc(100% - 28px));
  min-height: 58px;
  margin: 12px auto 0;
  padding: var(--space-2);
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: var(--superpanel-lg);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0.09)),
    rgba(142, 0, 28, 0.24);
  box-shadow: 0 24px 70px rgba(96, 0, 24, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(28px) saturate(190%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  transition: box-shadow 240ms ease, border-color 240ms ease, background 240ms ease, transform 240ms ease;
}

.topbar.is-nav-changing {
  border-color: rgba(255, 255, 255, 0.62);
  box-shadow: 0 30px 82px rgba(96, 0, 24, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.54);
  animation: nav-change-pop 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.topbar.is-nav-changing .brand,
.topbar.is-nav-changing .nav-links,
.topbar.is-nav-changing .toolbar {
  animation: nav-items-slide 360ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.brand,
.nav-links,
.toolbar,
.hero-actions,
.contact-actions,
.editor-row,
.editor-actions {
  display: flex;
  align-items: center;
}

.brand {
  gap: var(--space-2);
  justify-self: center;
  justify-content: center;
  width: var(--side-control-w);
  min-width: var(--side-control-w);
  min-height: var(--control-h);
  padding: 0 var(--control-pad-x);
  border: 1px solid var(--line);
  border-radius: var(--superpill);
  text-decoration: none;
  font-family: Fredoka, Nunito, sans-serif;
  font-weight: 900;
  line-height: 1;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.06)),
    rgba(160, 0, 30, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: background 180ms ease, transform 180ms ease, border-color 180ms ease, width 260ms ease, min-width 260ms ease;
}

.brand:hover {
  border-color: rgba(255, 255, 255, 0.56);
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(60, 0, 20, 0.24));
}

.brand-mark svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.home-mark svg {
  width: 24px;
  height: 24px;
  filter: drop-shadow(0 4px 8px rgba(60, 0, 20, 0.22));
}

.back-mark svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.35;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 4px 8px rgba(60, 0, 20, 0.22));
}

.brand.is-back-link {
  width: 132px;
  min-width: 132px;
}

.nav-links {
  justify-self: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: var(--space-1);
  width: 100%;
  max-width: 100%;
  min-height: calc(var(--control-h) + (var(--space-1) * 2));
  padding: var(--space-1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--superpanel);
  background: rgba(85, 0, 20, 0.14);
  transition: background 220ms ease, border-color 220ms ease;
}

.nav-links a,
.ghost-button,
.primary-button,
.tab,
.language-toggle,
.icon-button {
  min-height: var(--control-h);
  border: 1px solid var(--line);
  border-radius: var(--superpill);
  text-decoration: none;
}

.nav-links a {
  display: grid;
  flex: 1;
  place-items: center;
  min-width: 0;
  min-height: var(--control-h);
  padding: 0 var(--control-pad-x);
  color: white;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.1);
  transition: background 180ms ease, transform 180ms ease, border-color 180ms ease, color 180ms ease;
  animation: nav-link-in 260ms ease both;
}

.nav-links a:hover {
  border-color: rgba(255, 255, 255, 0.56);
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.nav-links a.is-active {
  border-color: rgba(255, 255, 255, 0.72);
  color: var(--red-dark);
  background: rgba(255, 255, 255, 0.88);
}

.toolbar {
  justify-self: center;
  justify-content: center;
  gap: var(--space-2);
  min-width: var(--side-control-w);
}

.icon-button {
  color: white;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0.08)),
    rgba(160, 0, 30, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.language-options {
  position: relative;
  width: var(--side-control-w);
  min-width: var(--side-control-w);
}

.language-toggle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: 100%;
  min-height: var(--control-h);
  padding: 0 34px 0 var(--control-pad-x);
  border: 1px solid var(--line);
  border-radius: var(--superpill);
  color: white;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.06)),
    rgba(160, 0, 30, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
  cursor: pointer;
  font-weight: 900;
  line-height: 1;
}

.language-choice {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-width: 0;
}

.language-flag {
  display: inline-grid;
  place-items: center;
  width: 42px;
  min-width: 42px;
  height: 26px;
  overflow: hidden;
  border-radius: 4px;
  box-shadow: 0 5px 12px rgba(70, 0, 24, 0.2);
}

.language-flag img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: auto;
  transform: translateZ(0);
}

.language-label {
  min-width: 0;
  line-height: 1;
}

.language-toggle::after {
  position: absolute;
  right: 15px;
  top: 50%;
  width: 8px;
  height: 8px;
  content: "";
  border-right: 2px solid rgba(255, 255, 255, 0.86);
  border-bottom: 2px solid rgba(255, 255, 255, 0.86);
  transform: translateY(-65%) rotate(45deg);
  transition: transform 180ms ease;
}

.language-options.is-open .language-toggle::after {
  transform: translateY(-35%) rotate(225deg);
}

.icon-button {
  display: grid;
  place-items: center;
  min-width: var(--control-h);
  min-height: var(--control-h);
  padding: 0 var(--control-pad-x);
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 900;
  border-radius: var(--superpill);
  line-height: 1;
}

.login-menu {
  position: relative;
}

.login-toggle {
  min-width: var(--side-control-w);
}

.login-toggle.has-profile {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
  padding: 0 var(--control-pad-x);
}

.profile-avatar {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  overflow: hidden;
  border-radius: var(--supercircle);
  color: white;
  background: linear-gradient(145deg, #7d3cc4, #4e22a8);
  font-size: 0.84rem;
  font-weight: 900;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-name {
  max-width: 92px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-summary {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--superpanel);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.06)),
    rgba(90, 12, 120, 0.22);
}

.account-avatar {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  overflow: hidden;
  border-radius: var(--supercircle);
  color: white;
  background: linear-gradient(145deg, #7d3cc4, #4e22a8);
  font-weight: 900;
}

.account-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.account-copy {
  display: grid;
  min-width: 0;
  text-align: left;
}

.account-copy strong {
  overflow: hidden;
  color: white;
  font-size: 0.95rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-copy small {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.language-panel,
.login-options {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  display: grid;
  gap: var(--space-2);
  min-width: 250px;
  padding: var(--space-2);
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: var(--superpanel);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.09)),
    rgba(150, 0, 36, 0.42);
  box-shadow: 0 22px 58px rgba(80, 0, 28, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.38);
  backdrop-filter: blur(26px) saturate(190%);
  -webkit-backdrop-filter: blur(26px) saturate(190%);
  transform-origin: top right;
  animation: menu-pop 170ms ease both;
}

.language-panel[hidden],
.login-options[hidden] {
  display: none;
}

.language-panel button,
.login-options button {
  min-height: var(--control-h);
  padding: 0 var(--control-pad-x);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--superpill-sm);
  color: white;
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
  font-weight: 900;
  text-align: left;
  line-height: 1;
}

.language-panel button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.language-panel button.is-active,
.language-panel button:hover,
.login-options button:hover {
  border-color: rgba(255, 255, 255, 0.52);
  background: rgba(255, 255, 255, 0.2);
}

.auth-modal {
  width: min(820px, calc(100% - 28px));
  padding: 0;
  border: 0;
  color: var(--text);
  background: transparent;
}

.auth-modal::backdrop {
  background: rgba(110, 0, 34, 0.54);
  backdrop-filter: blur(8px);
}

.auth-shell {
  border: 1px solid var(--line);
  border-radius: var(--superpanel-lg);
  padding: 24px;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.08) 48%, rgba(255, 255, 255, 0.16)),
    rgba(120, 0, 34, 0.26);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.34);
  backdrop-filter: blur(42px) saturate(210%);
  -webkit-backdrop-filter: blur(42px) saturate(210%);
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(210px, 0.72fr);
  gap: calc(var(--space-2) * 2);
  align-items: stretch;
}

.auth-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  margin-bottom: 14px;
}

.auth-grid label {
  display: grid;
  gap: var(--space-2);
  font-weight: 900;
}

.auth-grid input {
  width: 100%;
  min-height: 52px;
  padding: 0 var(--control-pad-x);
  border: 1px solid var(--line);
  border-radius: var(--superpill);
  color: white;
  background: rgba(255, 255, 255, 0.12);
  text-align: left;
}

.password-field {
  position: relative;
  display: block;
}

.password-field input {
  padding-right: 52px;
}

.password-field button {
  position: absolute;
  top: 50%;
  right: 10px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--supercircle);
  color: white;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
  transform: translateY(-50%);
}

.field-help {
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.3;
}

.password-meter {
  display: block;
  height: 8px;
  overflow: hidden;
  border-radius: var(--superpill-sm);
  background: rgba(255, 255, 255, 0.14);
}

.password-meter span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #ff6a7a;
  transition: width 180ms ease, background 180ms ease;
}

.password-meter[data-strength="medium"] span {
  background: #ffd166;
}

.password-meter[data-strength="strong"] span {
  background: #73e0a9;
}

.auth-error {
  min-height: 1.4em;
  margin: 8px 0 0;
  color: #ffe0e7;
  font-weight: 900;
}

.auth-photo-panel {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: var(--space-3);
  min-height: 100%;
  padding: calc(var(--space-2) * 2);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--superpanel-lg);
  background:
    radial-gradient(circle at 50% 24%, rgba(255, 255, 255, 0.24), transparent 28%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.06)),
    rgba(107, 44, 190, 0.28);
}

.auth-photo-preview {
  display: grid;
  place-items: center;
  width: 156px;
  height: 156px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.48);
  border-radius: var(--supercircle);
  color: white;
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.26), transparent 28%),
    linear-gradient(145deg, #8e53df, #4c1aa7);
  box-shadow: 0 22px 54px rgba(45, 0, 90, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  cursor: pointer;
  font-family: Fredoka, Nunito, sans-serif;
  font-size: 4.3rem;
  font-weight: 700;
}

.auth-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.auth-photo-panel p {
  max-width: 210px;
  margin: 0;
  color: var(--card-muted);
  line-height: 1.4;
}

.captcha-check {
  display: grid;
  justify-content: center;
  gap: var(--space-2);
  min-height: 78px;
  margin: 14px auto;
  padding: var(--space-3);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--superpanel);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.06)),
    rgba(110, 42, 190, 0.28);
  font-weight: 900;
}

.captcha-check p {
  margin: 0;
  color: var(--card-muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

main {
  width: min(1040px, calc(100% - 28px));
  margin: 0 auto;
}

body.is-loading .topbar,
body.is-loading .hero-copy,
body.is-loading .hero-visual {
  opacity: 0;
  transform: translateY(18px) scale(0.98);
}

.topbar,
.hero-copy,
.hero-visual {
  transition: opacity 620ms ease, transform 620ms ease;
}

body.is-ready .topbar {
  transition-delay: 60ms;
}

body.is-ready .hero-copy {
  transition-delay: 180ms;
}

body.is-ready .hero-visual {
  transition-delay: 280ms;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 520px) minmax(190px, 300px);
  align-items: center;
  justify-content: center;
  gap: 24px;
  min-height: clamp(430px, 68vh, 620px);
  padding: 38px 0 28px;
  text-align: center;
}

.hero-copy {
  max-width: 560px;
  margin: 0 auto;
}

.hero-visual {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  transform: rotate(1deg);
}

.hero-visual img {
  width: min(112%, 330px);
  height: auto;
  object-fit: contain;
  image-rendering: auto;
  filter: drop-shadow(0 20px 34px rgba(20, 0, 30, 0.26));
  animation: float-logo 7s ease-in-out infinite;
}

.eyebrow {
  margin: 0 0 9px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 12px;
  font-family: Fredoka, Nunito, sans-serif;
  font-size: clamp(2.8rem, 6.2vw, 5.1rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  text-wrap: balance;
}

h2 {
  margin-bottom: 10px;
  font-family: Fredoka, Nunito, sans-serif;
  font-size: clamp(1.7rem, 3.4vw, 3rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
}

.hero-text {
  max-width: 470px;
  margin-right: auto;
  margin-left: auto;
  color: var(--muted);
  font-size: clamp(0.98rem, 1.5vw, 1.12rem);
  line-height: 1.45;
  font-weight: 500;
}

.hero-actions,
.contact-actions,
.editor-actions {
  justify-content: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  max-width: 720px;
  margin-right: auto;
  margin-left: auto;
}

.primary-button,
.ghost-button,
.tab {
  display: inline-grid;
  place-items: center;
  min-width: 112px;
  min-height: var(--control-h);
  padding: 0 var(--control-pad-x);
  cursor: pointer;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.primary-button {
  border-color: rgba(255, 255, 255, 0.62);
  color: var(--red-dark);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 48px rgba(96, 0, 18, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.ghost-button,
.tab {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
}

.hero-actions .primary-button,
.contact-actions .primary-button {
  border-color: var(--line);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: none;
}

.social-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
}

.button-icon {
  display: inline-grid;
  place-items: center;
  width: 1.22em;
  height: 1.22em;
  flex: 0 0 1.22em;
  color: #fff;
  line-height: 0;
}

.button-icon img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  filter: brightness(0) invert(1);
  image-rendering: auto;
}

.social-button[href*="discord"] .button-icon img {
  width: 1.08em;
  height: 1.08em;
}

.social-button[href*="twitch"] .button-icon img {
  width: 0.96em;
  height: 0.96em;
}

.social-button[href^="mailto:"] .button-icon img {
  width: 1.04em;
  height: 1.04em;
  object-position: center;
}

.glass-card,
.project-card,
.detail-intro,
.gallery-card,
.about-section,
.contact-section,
.editor-shell {
  border: 1px solid var(--line);
  border-radius: var(--superpanel-lg);
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.08) 48%, rgba(255, 255, 255, 0.16)),
    rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.34), inset 0 -18px 44px rgba(124, 0, 24, 0.16);
  backdrop-filter: blur(42px) saturate(210%);
  -webkit-backdrop-filter: blur(42px) saturate(210%);
  position: relative;
  overflow: hidden;
  color: var(--card-text);
}

.glass-card::before,
.project-card::before,
.detail-intro::before,
.gallery-card::before,
.about-section::before,
.contact-section::before,
.editor-shell::before {
  position: absolute;
  inset: 1px;
  content: "";
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.5), transparent 30%),
    radial-gradient(circle at 24% 10%, rgba(255, 255, 255, 0.32), transparent 18%),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.14), transparent 45%);
  opacity: 0.74;
}

.glass-card > *,
.project-card > *,
.detail-intro > *,
.gallery-card > *,
.about-section > *,
.contact-section > *,
.editor-shell > * {
  position: relative;
  z-index: 1;
}

.section {
  padding: 56px 0 42px;
}

.section-heading {
  max-width: 640px;
  margin: 0 auto 24px;
  text-align: center;
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2);
  margin-bottom: 20px;
}

.category-tabs .tab {
  min-width: 128px;
}

.tab.is-active {
  border-color: rgba(255, 255, 255, 0.72);
  color: var(--red-dark);
  background: rgba(255, 255, 255, 0.86);
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 300px));
  gap: 16px;
  justify-content: center;
  justify-items: center;
}

.project-card {
  width: 100%;
  max-width: 300px;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  transform: translateY(0);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.project-card:hover,
.project-card:focus-within {
  border-color: rgba(255, 255, 255, 0.44);
  transform: translateY(-4px);
  box-shadow: 0 24px 62px rgba(36, 10, 46, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.project-card,
.project-card * {
  text-decoration: none;
}

.project-visual {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  aspect-ratio: 16 / 9.8;
  min-height: 0;
  padding: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(34, 0, 18, 0.16)),
    rgba(255, 255, 255, 0.05);
}

.project-visual::before {
  display: none;
}

.project-visual img {
  position: absolute;
  inset: 10px;
  width: calc(100% - 20px);
  height: calc(100% - 20px);
  object-fit: contain;
  z-index: 1;
  transition: transform 420ms ease, filter 240ms ease;
}

.project-visual.has-cover::after {
  position: absolute;
  inset: auto 0 0;
  z-index: 1;
  display: block;
  height: 46%;
  content: "";
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(54, 0, 28, 0.26) 66%, rgba(25, 0, 18, 0.34));
}

.project-card:hover .project-visual img,
.project-card:focus-visible .project-visual img {
  transform: scale(1.04);
  filter: saturate(1.08) contrast(1.04);
}

.project-cazzeggio .project-visual img {
  transform: scale(1.24);
}

.project-cazzeggio:hover .project-visual img,
.project-cazzeggio:focus-visible .project-visual img {
  transform: scale(1.28);
}

.project-socialmedia .project-visual {
  background:
    linear-gradient(180deg, rgba(8, 8, 14, 0.18), rgba(28, 0, 18, 0.1)),
    rgba(14, 13, 21, 0.16);
}

.project-socialmedia .project-visual img {
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-commissioni .project-visual img {
  transform: scale(1.1);
}

.project-commissioni:hover .project-visual img,
.project-commissioni:focus-visible .project-visual img {
  transform: scale(1.14);
}

.project-icon {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 106px;
  height: 106px;
  margin: auto;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--supercircle);
  color: rgba(255, 255, 255, 0.92);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.06)),
    rgba(42, 12, 90, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.26), 0 24px 62px rgba(28, 0, 70, 0.28);
}

.project-icon svg {
  width: 58px;
  height: 58px;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.empty-image {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--superpill);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  color: white;
  font-weight: 800;
  position: relative;
  z-index: 2;
}

.empty-image {
  margin: auto;
  padding: 16px 20px;
  text-align: center;
  font-size: 1rem;
}

.project-content {
  display: grid;
  align-content: start;
  justify-items: center;
  min-height: 128px;
  padding: 17px 18px 18px;
  text-align: center;
}

.project-category {
  margin-bottom: 10px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.project-content h3 {
  margin-bottom: 9px;
  font-family: Fredoka, Nunito, sans-serif;
  font-size: 1.36rem;
  font-weight: 700;
}

.project-content p {
  max-width: 260px;
  color: var(--card-muted);
  font-size: 0.94rem;
  line-height: 1.45;
  margin-bottom: 0;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2);
  margin-top: 18px;
}

.project-tags span {
  display: inline-grid;
  place-items: center;
  min-height: 30px;
  padding: 0 var(--space-3);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--superpill-sm);
  color: rgba(255, 255, 255, 0.84);
  background: rgba(255, 255, 255, 0.1);
  font-size: 0.78rem;
  font-weight: 800;
}

.project-content a {
  color: #ffe6ec;
  font-weight: 800;
}

.project-link {
  display: inline-grid;
  place-items: center;
  min-height: var(--control-h);
  margin-top: 18px;
  padding: 0 var(--control-pad-x);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: var(--superpill);
  color: #ffffff;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.12);
}

body.is-detail-view .hero,
body.is-detail-view .about-section,
body.is-detail-view .contact-section {
  display: none;
}

body.is-detail-view .work-section {
  padding-top: 34px;
}

body.is-detail-view .section-heading {
  display: none;
}

.work-grid.detail-gallery {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: stretch;
  justify-items: stretch;
  gap: calc(var(--space-2) * 2);
  width: min(920px, 100%);
  margin: 0 auto;
  padding-top: 4px;
}

.detail-intro,
.gallery-card {
  overflow: hidden;
}

.detail-intro {
  grid-column: span 12;
  min-height: 220px;
  padding: clamp(24px, 4vw, 42px);
  background:
    radial-gradient(circle at 14% 20%, rgba(255, 255, 255, 0.24), transparent 26%),
    radial-gradient(circle at 88% 10%, rgba(255, 70, 130, 0.22), transparent 30%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(73, 20, 145, 0.18));
}

.detail-intro span,
.gallery-label {
  display: inline-grid;
  place-items: center;
  min-height: 30px;
  padding: 0 var(--space-3);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: var(--superpill-sm);
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.13);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.detail-intro h3 {
  max-width: 720px;
  margin: 18px 0 12px;
  font-family: Fredoka, Nunito, sans-serif;
  font-size: clamp(2.2rem, 7vw, 5rem);
  line-height: 0.92;
}

.detail-intro p {
  max-width: 620px;
  margin: 0;
  color: var(--card-muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

.gallery-card {
  grid-column: span 6;
  min-height: 100%;
  width: 100%;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.gallery-card:hover {
  border-color: rgba(255, 255, 255, 0.44);
  transform: translateY(-3px);
  box-shadow: 0 22px 58px rgba(36, 10, 46, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

.gallery-media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 176px;
  overflow: hidden;
  padding: 0;
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  color: inherit;
  cursor: zoom-in;
}

.gallery-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.gallery-commissioni .gallery-media {
  padding: 8px;
}

.gallery-commissioni .gallery-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scale(1.04);
}

.work-grid.detail-commissioni .gallery-commissioni {
  grid-column: 4 / span 6;
  width: 100%;
  justify-self: center;
}

.work-grid.detail-socialmedia .gallery-featured {
  grid-column: 4 / span 6;
  width: 100%;
  justify-self: center;
}

.gallery-featured .gallery-media {
  padding: 18px;
}

.gallery-featured .gallery-media img {
  object-fit: contain;
}

.gallery-label {
  position: absolute;
  right: 14px;
  bottom: 14px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.zoom-icon {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: var(--supercircle);
  color: white;
  background: rgba(86, 0, 26, 0.46);
  box-shadow: 0 10px 24px rgba(40, 0, 18, 0.22);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 160ms ease, transform 160ms ease, background 160ms ease;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.zoom-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.image-zoom-trigger:hover .zoom-icon,
.image-zoom-trigger:focus-visible .zoom-icon {
  opacity: 1;
  transform: translateY(0);
}

.image-zoom-trigger:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.7);
  outline-offset: -3px;
}

.gallery-copy {
  display: grid;
  justify-items: center;
  padding: 15px 16px 17px;
  text-align: center;
}

.gallery-copy h3 {
  margin-bottom: 8px;
  font-family: Fredoka, Nunito, sans-serif;
  font-size: 1.2rem;
}

.gallery-copy p {
  max-width: 390px;
  margin: 0;
  color: var(--card-muted);
  font-size: 0.94rem;
  line-height: 1.45;
}

.image-lightbox {
  width: min(980px, calc(100% - 28px));
  max-height: calc(100vh - 28px);
  margin: auto;
  padding: 0;
  border: 0;
  color: white;
  background: transparent;
}

.image-lightbox::backdrop {
  background: rgba(54, 0, 20, 0.74);
  backdrop-filter: blur(12px);
}

.image-lightbox-shell {
  display: grid;
  place-items: center;
  gap: var(--space-3);
  margin: 0;
  padding: calc(var(--space-2) * 2);
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: var(--superpanel-lg);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.06)),
    rgba(110, 0, 28, 0.42);
  box-shadow: 0 28px 84px rgba(30, 0, 18, 0.46), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
}

.image-lightbox img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 130px);
  object-fit: contain;
  border-radius: var(--supermedia);
  box-shadow: 0 20px 54px rgba(25, 0, 16, 0.28);
}

.image-lightbox figcaption {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.86);
  font-weight: 900;
  line-height: 1.3;
  text-align: center;
}

.image-lightbox-close {
  position: fixed;
  top: max(18px, env(safe-area-inset-top));
  right: max(18px, env(safe-area-inset-right));
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: var(--supercircle);
  color: white;
  background: rgba(92, 0, 24, 0.72);
  box-shadow: 0 12px 30px rgba(32, 0, 14, 0.32);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 900;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

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

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 520ms ease, transform 520ms ease;
}

@keyframes float-logo {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(-10px) scale(1.02);
  }
}

@keyframes menu-pop {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes nav-change-pop {
  0% {
    transform: translateY(0) scale(1);
  }

  42% {
    transform: translateY(-2px) scale(1.012);
  }

  100% {
    transform: translateY(0) scale(1);
  }
}

@keyframes nav-items-slide {
  from {
    opacity: 0.42;
    transform: translateY(-5px);
  }

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

@keyframes nav-link-in {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.about-section,
.contact-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: min(780px, 100%);
  margin: 0 auto 56px;
  padding: 26px;
  text-align: center;
}

.contact-actions {
  margin-top: 14px;
}

.hero-actions a,
.contact-actions a,
.editor-actions button,
.editor-tools button {
  flex: 0 1 132px;
}

.contact-actions .social-button {
  min-width: 132px;
}

.about-section > *,
.contact-section > * {
  max-width: 640px;
}

.about-section p:last-child {
  margin-bottom: 0;
  color: var(--card-muted);
  font-size: 1rem;
  line-height: 1.5;
  margin-top: 6px;
}

.editor-modal {
  width: min(1120px, calc(100% - 28px));
  padding: 0;
  border: 0;
  color: var(--text);
  background: transparent;
}

.editor-modal::backdrop {
  background: rgba(180, 0, 32, 0.58);
  backdrop-filter: blur(8px);
}

.editor-shell {
  max-height: calc(100vh - 28px);
  overflow: auto;
  padding: 22px;
  color: var(--text);
}

.editor-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(var(--space-2) * 2);
  margin-bottom: 20px;
  text-align: center;
  position: relative;
}

.editor-header .icon-button {
  position: absolute;
  top: 0;
  right: 0;
}

.editor-header h2 {
  font-size: 1.55rem;
}

.editor-login label,
.editor-area label {
  display: block;
  margin-bottom: 8px;
  font-weight: 800;
  text-align: center;
}

.editor-row {
  justify-content: center;
  gap: var(--space-2);
}

.editor-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2);
  margin: 12px 0 18px;
}

.inline-tools {
  justify-content: center;
  margin-top: 10px;
}

.project-editor-list {
  display: grid;
  gap: calc(var(--space-2) * 2);
  margin-bottom: 20px;
}

.project-editor-card {
  display: grid;
  grid-template-columns: minmax(220px, 0.72fr) minmax(0, 1.28fr);
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--superpanel-lg);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.06)),
    rgba(255, 255, 255, 0.09);
  text-align: center;
}

.project-editor-preview {
  position: sticky;
  top: 18px;
  display: grid;
  place-items: center;
  min-height: 260px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: var(--superpanel-lg);
  background:
    radial-gradient(circle at 28% 24%, rgba(255, 255, 255, 0.24), transparent 14%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04)),
    var(--accent);
}

.project-editor-preview img {
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
}

.project-editor-preview span {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--superpill);
  background: rgba(255, 255, 255, 0.14);
  font-weight: 800;
}

.project-editor-fields {
  display: grid;
  gap: var(--space-3);
}

.project-editor-head {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.danger-button {
  min-width: 112px;
  min-height: var(--control-h);
  padding: 0 var(--control-pad-x);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--superpill);
  color: white;
  background: rgba(120, 0, 24, 0.26);
  cursor: pointer;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.editor-grid,
.language-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.language-field {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-3);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--superpanel);
  background: rgba(255, 255, 255, 0.07);
}

.language-field h3 {
  margin: 0;
  font-size: 0.84rem;
}

.editor-row input,
.editor-input,
.project-editor-card input,
.editor-area textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--superpanel);
  color: var(--text);
  background: rgba(255, 255, 255, 0.12);
  text-align: center;
}

.project-editor-card input,
.project-editor-card textarea {
  min-height: var(--control-h);
  margin-top: var(--space-2);
  padding: 0 var(--control-pad-x);
}

.project-editor-card textarea {
  min-height: 96px;
  padding: 12px;
  resize: vertical;
}

#content-json,
.editor-area .generated-code {
  text-align: left;
}

.file-input {
  max-width: 280px;
  padding: 9px;
}

.editor-row input {
  min-height: var(--control-h);
  padding: 0 var(--control-pad-x);
}

.editor-input {
  min-height: var(--control-h);
  margin-bottom: 16px;
  padding: 0 var(--control-pad-x);
}

.editor-area textarea {
  min-height: 420px;
  padding: 14px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.92rem;
  resize: vertical;
}

.editor-area .generated-code {
  min-height: 220px;
  margin-top: 8px;
}

.advanced-editor {
  margin: 18px 0;
}

.advanced-editor summary {
  cursor: pointer;
  font-weight: 800;
}

.editor-hint {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

@media (max-width: 880px) {
  .topbar {
    align-items: center;
    justify-content: center;
    grid-template-columns: 1fr;
    gap: var(--space-2);
    border-radius: var(--superpanel-lg);
  }

  .nav-links {
    order: 3;
    width: 100%;
    justify-content: center;
  }

  .nav-links a {
    flex: 1;
    min-width: 0;
    padding: 0 8px;
  }

  .brand,
  .language-options,
  .nav-links,
  .toolbar {
    justify-self: center;
    min-width: 0;
  }

  .toolbar {
    width: 100%;
    justify-content: center;
    min-width: 0;
  }

  .hero,
  .section-heading,
  .about-section,
  .contact-section {
    grid-template-columns: 1fr;
  }

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

  .hero-visual {
    max-width: 250px;
    margin: 0 auto;
    order: -1;
  }

  .work-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 300px));
  }

  .gallery-card {
    grid-column: span 12;
  }
}

@media (max-width: 560px) {
  main,
  .topbar {
    width: min(100% - 20px, 980px);
  }

  .topbar {
    position: relative;
    top: 0;
    margin-top: 10px;
    padding: 10px;
  }

  .brand {
    width: 100%;
    justify-content: center;
  }

  .language-options {
    width: 100%;
  }

  .toolbar {
    width: 100%;
    justify-content: center;
  }

  .nav-links {
    gap: var(--space-1);
  }

  .nav-links a {
    min-height: var(--control-h-sm);
    font-size: 0.88rem;
  }

  h1 {
    font-size: 2.8rem;
  }

  h2 {
    font-size: 1.8rem;
  }

  .hero-text {
    font-size: 1rem;
  }

  .hero-actions a,
  .contact-actions a,
  .tab {
    min-height: var(--control-h);
    padding: 0 var(--control-pad-x);
  }

  .editor-row {
    align-items: stretch;
    flex-direction: column;
  }

  .project-editor-card,
  .editor-grid,
  .language-field-grid,
  .auth-layout,
  .auth-grid {
    grid-template-columns: 1fr;
  }

  .project-editor-preview {
    position: relative;
    top: 0;
  }

  .project-editor-head {
    align-items: stretch;
    flex-direction: column;
  }

  .inline-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .file-input {
    max-width: none;
  }

  .section {
    padding: 42px 0;
  }

  .project-visual {
    min-height: 174px;
  }

  body.is-detail-view .work-section {
    padding-top: 42px;
  }

  .work-grid.detail-gallery {
    gap: var(--space-3);
  }

  .detail-intro {
    min-height: 180px;
    padding: 22px;
  }

  .gallery-media {
    min-height: 170px;
  }

  .about-section,
  .contact-section {
    margin-bottom: 42px;
    padding: 20px;
  }

  .image-lightbox-shell {
    padding: 10px;
  }

  .image-lightbox img {
    max-height: calc(100vh - 112px);
    border-radius: var(--supermedia);
  }
}
