@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,200..800&display=swap');

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

:root {
  --bg: #f5f0ea;
  --text: #1a1816;
  --text-dim: rgba(255, 255, 255, 0.4);
  --glass-text: #fff;
  --lock-border: #c8a050;
  --lock-glow: rgba(200, 160, 80, 0.35);
}

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  background: var(--bg) url('../assets/bg_night.png') center / cover no-repeat fixed;
  font-family: 'Bricolage Grotesque', sans-serif;
  color: var(--text);
}

body {
  animation: pageIn 0.6s ease both;
}

@keyframes pageIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Mobile placeholder ── */
#mobile-placeholder {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg);
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
  padding: 2rem;
  z-index: 9999;
}
#mobile-placeholder .mark {
  font-size: 2rem;
  opacity: 0.4;
  letter-spacing: 0.4em;
}
#mobile-placeholder h2 {
  font-weight: 300;
  font-size: 1.5rem;
  letter-spacing: 0.15em;
}
#mobile-placeholder p {
  font-style: italic;
  opacity: 0.45;
  font-size: 1rem;
  letter-spacing: 0.08em;
}

@media (max-width: 768px) {
  #mobile-placeholder { display: flex; }
  #canvas, #ui, .page-content { display: none !important; }
}

/* ── UI Chrome ── */
#ui {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

/* ── Chrome panel (liquid glass) ── */
#chrome-panel {
  position: fixed;
  top: 72px; left: 24px;
  z-index: 100;
  width: 178px;
  padding: 28px 28px 24px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(24px) saturate(1.4) brightness(1.1);
  -webkit-backdrop-filter: blur(24px) saturate(1.4) brightness(1.1);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-top-color: rgba(255, 255, 255, 0.5);
  border-left-color: rgba(255, 255, 255, 0.4);
  border-radius: 22px;
  box-shadow:
    0 8px 32px rgba(0,0,0,0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -1px 0 rgba(0, 0, 0, 0.05);
  pointer-events: auto;
  color: var(--text);
}

#avatar {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 17px;
  object-fit: cover;
  margin-bottom: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15), inset 0 0 0 1px rgba(255,255,255,0.2);
}

#site-name {
  display: block;
  font-size: 1.26rem;
  font-weight: 300;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  opacity: 0.85;
  text-decoration: none;
  color: var(--text);
  transition: opacity 0.3s ease;
}
a#site-name:hover {
  opacity: 1;
}

#site-tagline {
  font-size: 0.9rem;
  font-style: italic;
  letter-spacing: 0.12em;
  opacity: 0.45;
  margin-top: 3px;
  margin-bottom: 19px;
}

/* ── Nav ── */
#nav {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
#nav a {
  display: block;
  font-size: 0.76rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  opacity: 0.65;
  padding: 7px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: opacity 0.25s ease, background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
#nav a:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 2px 10px rgba(0,0,0,0.06), inset 0 1px 0 rgba(255,255,255,0.25);
}
#nav a.active {
  opacity: 1;
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 2px 10px rgba(0,0,0,0.06), inset 0 1px 0 rgba(255,255,255,0.3);
}

/* ── Socials dropdown ── */
#socials-wrap {
  position: relative;
}
#socials-toggle {
  display: block;
  font-size: 0.76rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text);
  opacity: 0.65;
  cursor: pointer;
  padding: 7px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: opacity 0.25s ease, background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
#socials-wrap:hover #socials-toggle {
  opacity: 1;
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 2px 10px rgba(0,0,0,0.06), inset 0 1px 0 rgba(255,255,255,0.25);
}
#socials-flyout {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 0 2px 12px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.3s ease;
}
#socials-wrap:hover #socials-flyout {
  max-height: 120px;
  opacity: 1;
}
#socials-flyout a {
  font-size: 0.78rem;
  font-weight: 300;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  opacity: 0.45;
  transition: opacity 0.3s ease;
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}
#socials-flyout a:hover { opacity: 1; }
#socials-flyout svg {
  flex-shrink: 0;
  opacity: 0.7;
}

/* ── Toggles row ── */
#toggles-row {
  position: fixed;
  top: 24px; left: 24px;
  z-index: 100;
  width: 178px;
  display: flex;
  gap: 8px;
}

/* ── Shared toggle badge ── */
.toggle-badge {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 10px;
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(24px) saturate(1.4) brightness(1.1);
  -webkit-backdrop-filter: blur(24px) saturate(1.4) brightness(1.1);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-top-color: rgba(255, 255, 255, 0.65);
  border-left-color: rgba(255, 255, 255, 0.55);
  border-radius: 12px;
  box-shadow:
    0 4px 16px rgba(0,0,0,0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 -1px 0 rgba(0, 0, 0, 0.05);
  cursor: pointer;
  user-select: none;
  transition: background 0.3s ease, border-color 0.3s ease;
}
.toggle-badge:hover {
  background: rgba(255, 255, 255, 0.55);
  border-color: rgba(255, 255, 255, 0.6);
}

/* ── Toggle icon ── */
.toggle-icon {
  width: 16px; height: 16px;
  opacity: 0.6;
  flex-shrink: 0;
}

/* ── Day/Night icon swap ── */
#theme-toggle-icon .moon { display: block; }
#theme-toggle-icon .sun { display: none; }
.day #theme-toggle-icon .moon { display: none; }
.day #theme-toggle-icon .sun { display: block; }

/* ── Toggle track (shared) ── */
.toggle-track {
  width: 36px;
  height: 20px;
  border-radius: 10px;
  background: rgba(44, 40, 36, 0.12);
  border: 1px solid rgba(44, 40, 36, 0.1);
  position: relative;
  flex-shrink: 0;
  transition: background 0.3s ease;
}
.toggle-thumb {
  position: absolute;
  top: 2px; left: 2px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--text);
  opacity: 0.5;
  transition: left 0.3s ease, opacity 0.3s ease;
}

/* ── Day mode active state ── */
.day #theme-toggle .toggle-track {
  background: rgba(44, 40, 36, 0.25);
}
.day #theme-toggle .toggle-thumb {
  left: 18px;
  opacity: 0.7;
}

/* ── Day mode background ── */
html.day, html.day body {
  background-image: url('../assets/bg.png');
}

/* ── Cat toggle active state ── */
.cat-active #cat-toggle .toggle-track {
  background: rgba(44, 40, 36, 0.25);
}
.cat-active #cat-toggle .toggle-thumb {
  left: 18px;
  opacity: 0.7;
}

/* ── Rising cat ── */
#rising-cat {
  position: fixed;
  bottom: -300px;
  right: 40px;
  z-index: 90;
  width: 230px;
  height: auto;
  transform: scaleX(-1);
  transition: bottom 1.2s cubic-bezier(0.34, 1.2, 0.64, 1);
  pointer-events: none;
}
.cat-active #rising-cat {
  bottom: -10px;
}

/* ── Hint bar ── */
#hint {
  position: absolute;
  bottom: 64px; left: 50%;
  transform: translateX(-50%);
  font-size: 0.68rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--glass-text);
  opacity: 0.7;
  text-shadow: 0 1px 3px rgba(0,0,0,0.15);
  transition: opacity 0.6s ease;
  white-space: nowrap;
  padding: 10px 22px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(24px) saturate(1.4) brightness(1.1);
  -webkit-backdrop-filter: blur(24px) saturate(1.4) brightness(1.1);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-top-color: rgba(255, 255, 255, 0.5);
  border-left-color: rgba(255, 255, 255, 0.4);
  border-radius: 14px;
  box-shadow:
    0 8px 32px rgba(0,0,0,0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -1px 0 rgba(0, 0, 0, 0.05);
}

/* ── Footer (below nav panel) ── */
#footer {
  position: fixed;
  top: 0;
  left: 24px;
  width: 178px;
  padding: 10px 16px;
  font-size: 0.78rem;
  font-weight: 300;
  letter-spacing: 0.12em;
  line-height: 1.5;
  color: rgba(26, 24, 22, 0.65);
  z-index: 100;
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(24px) saturate(1.4) brightness(1.1);
  -webkit-backdrop-filter: blur(24px) saturate(1.4) brightness(1.1);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-top-color: rgba(255, 255, 255, 0.65);
  border-left-color: rgba(255, 255, 255, 0.55);
  border-radius: 12px;
  box-shadow:
    0 4px 16px rgba(0,0,0,0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 -1px 0 rgba(0, 0, 0, 0.05);
}
#footer-cat {
  position: absolute;
  right: -100px;
  bottom: -50px;
  width: 120px;
  height: auto;
  transform: scaleX(-1);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
#footer:hover #footer-cat {
  opacity: 1;
}

#footer a {
  color: rgba(26, 24, 22, 0.8);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: opacity 0.3s ease;
}
#footer a:hover {
  color: rgba(26, 24, 22, 1);
}
