/* CozySpace — themes: cozy (default), ironlung, forest */

:root,
.theme-cozy {
  --bg: #f5f5f0;
  --bg-panel: #ffffff;
  --bg-header: #ebebeb;
  --border: #333;
  --border-light: #ccc;
  --text: #1a1a1a;
  --text-dim: #555;
  --accent: #000;
  --link: #000;
  --link-hover: #444;
  --snow-color: #333;
  --pixel: 'Press Start 2P', monospace;
  --serif: 'Cormorant Garamond', Georgia, serif;
}

.theme-ironlung {
  --bg: #0a0606;
  --bg-panel: #160e0c;
  --bg-header: #201412;
  --border: #5c2820;
  --border-light: #3a1a14;
  --text: #e8d4cc;
  --text-dim: #9a7068;
  --accent: #c43828;
  --link: #e86048;
  --link-hover: #ff8068;
  --snow-color: #a05040;
}

.theme-forest {
  --bg: #2a2218;
  --bg-panel: #342a1e;
  --bg-header: #3e3224;
  --border: #6b5340;
  --border-light: #4a3c2c;
  --text: #e8e0d0;
  --text-dim: #a09078;
  --accent: #8b6914;
  --link: #c9a858;
  --link-hover: #e0c078;
  --snow-color: #8a7858;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}

a { color: var(--link); }
a:hover { color: var(--link-hover); }
img { max-width: 100%; height: auto; display: block; }

.about {
    text-align: center;
    white-space: pre-line;
    line-height: 1.55;
}

/* floating corner decor */
.corner-floats {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 40;
}

.corner-float {
  position: fixed;
  max-width: 100px;
  opacity: 0.85;
  pointer-events: auto;
  cursor: pointer;
  transition: transform 0.2s;
}

.corner-float:hover { transform: scale(1.1); }
.corner-float.tl { top: 10px; left: 10px; }
.corner-float.tr { top: 10px; right: 10px; }
.corner-float.bl { bottom: 10px; left: 10px; }
.corner-float.br { bottom: 10px; right: 10px; }

/* symbol snowfall */
#symbol-snow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9997;
}

/* big edge banners (teeth, jaws, decor — full screen width) */
.edge-banner {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
  pointer-events: none;
  z-index: 200;
  line-height: 0;
  overflow: hidden;
}

.edge-banner img { 
  width: 100%;
  height: auto;
  max-height: 22vh;
  object-fit: cover;
  object-position: center;
  display: block;
}

.edge-banner-top { top: 0; }
.edge-banner-bottom { bottom: 0; }

.edge-banner-top img { object-position: bottom center; }
.edge-banner-bottom img { object-position: top center; }

/* pet / companion — sits on top of everything */
.pet-companion {
  position: fixed;
  bottom: 12px;
  right: 12px;
  z-index: 10000;
  pointer-events: auto;
  cursor: pointer;
  transition: transform 0.2s;
}

.pet-companion img {
  max-width: 130px;
  max-height: 130px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.25));
  animation: pet-bob 3.5s ease-in-out infinite;
}

.pet-companion:hover img { transform: scale(1.08) rotate(-3deg); }

@keyframes pet-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* sparkle cursor trail */
.cursor-sparkle {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  font-size: 13px;
  color: var(--text);
  opacity: 0.75;
  animation: sparkle-fade 0.8s ease-out forwards;
}

@keyframes sparkle-fade {
  0% { opacity: 0.9; transform: scale(1); }
  100% { opacity: 0; transform: scale(0) translateY(-18px); }
}

/* fx toggle buttons */
.fx-controls {
  position: fixed;
  bottom: 12px;
  left: 12px;
  z-index: 10001;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.fx-btn {
  font-family: var(--pixel);
  font-size: 0.42rem;
  padding: 6px 8px;
  border: 1px solid var(--border);
  background: var(--bg-panel);
  color: var(--text);
  cursor: pointer;
  line-height: 1.4;
}

.fx-btn:hover { background: var(--bg-header); }
.fx-btn:active { transform: translateY(1px); }

/* mouse-following cat */
.mouse-cat {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9998;
  pointer-events: none;
  width: 72px;
  height: 72px;
  will-change: transform;
}

.mouse-cat img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3));
  transition: transform 0.15s ease;
}

.mouse-cat.facing-right img { transform: scaleX(1); }
.mouse-cat:not(.facing-right) img { transform: scaleX(-1); }

.page-outer {
  max-width: 1100px;
  margin: 24px auto;
  padding: 0 12px 40px;
}

/* top bar */
.top-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

.site-logo img { width: 36px; height: 36px; object-fit: contain; }

.site-logo span {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 600;
}

.status-list {
  font-family: var(--pixel);
  font-size: 0.45rem;
  line-height: 2;
  color: var(--text-dim);
  text-align: right;
}

/* nav */
.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 12px;
  padding: 10px 0 16px;
  border-bottom: 1px dashed var(--border-light);
  margin-bottom: 20px;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
}

.site-nav a {
  font-family: var(--pixel);
  font-size: 0.5rem;
  text-decoration: none;
  color: var(--text);
  padding: 4px 0;
}

.site-nav a:hover,
.site-nav a.active { text-decoration: underline; }

.theme-switcher {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  margin-left: auto;
}

.theme-label {
  font-family: var(--pixel);
  font-size: 0.42rem;
  color: var(--text-dim);
}

.theme-switcher button {
  font-family: var(--pixel);
  font-size: 0.42rem;
  padding: 4px 7px;
  border: 1px solid var(--border);
  background: var(--bg-panel);
  color: var(--text);
  cursor: pointer;
  line-height: 1.4;
}

.theme-switcher button:hover { background: var(--bg-header); }
.theme-switcher button.active {
  background: var(--accent);
  color: var(--bg-panel);
  border-color: var(--accent);
}

.theme-ironlung .theme-switcher button.active { color: #0a0606; }
.theme-forest .theme-switcher button.active { color: #2a2218; }

/* two-column layout */
.layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 760px) {
  .layout { grid-template-columns: 1fr; }
}

/* boxes */
.box {
  border: 1px solid var(--border);
  background: var(--bg-panel);
  margin-bottom: 16px;
}

.box-head {
  font-family: var(--pixel);
  font-size: 0.5rem;
  padding: 8px 10px;
  background: var(--bg-header);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 6px;
}

.box-head::before {
  content: '+';
  display: inline-block;
  width: 14px;
  height: 14px;
  line-height: 12px;
  text-align: center;
  border: 1px solid var(--border);
  font-size: 0.55rem;
}

.box-body { padding: 12px; font-size: 0.95rem; }

/* sidebar */
.profile-circle {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 2px solid var(--border);
  object-fit: cover;
  margin: 0 auto 10px;
}

.profile-name {
  text-align: center;
  font-weight: 600;
  margin-bottom: 8px;
}

.contact-list { list-style: none; }
.contact-list li { margin-bottom: 6px; font-size: 0.9rem; }

.interest-table {
  width: 100%;
  font-size: 0.85rem;
  border-collapse: collapse;
}

.interest-table td {
  padding: 4px 0;
  vertical-align: top;
  border-bottom: 1px dotted var(--border-light);
}

.interest-table td:first-child {
  font-weight: 600;
  width: 38%;
  padding-right: 8px;
}

.meta-table {
  width: 100%;
  font-size: 0.8rem;
}

.meta-table td { padding: 3px 0; }
.meta-table td:first-child { color: var(--text-dim); width: 45%; }

/* main content */
.welcome-title {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.tag {
  font-family: var(--pixel);
  font-size: 0.4rem;
  padding: 4px 8px;
  border: 1px solid var(--border);
}

.photo-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

@media (max-width: 600px) {
  .photo-row { grid-template-columns: repeat(3, 1fr); }
}

.photo-slot {
  aspect-ratio: 1;
  border: 1px solid var(--border);
  background: var(--bg-header);
  overflow: hidden;
}

.photo-slot img { width: 100%; height: 100%; object-fit: cover; }

.update-item {
  padding: 10px 0;
  border-bottom: 1px dashed var(--border-light);
}

.update-item:last-child { border-bottom: none; }

.update-date {
  font-family: var(--pixel);
  font-size: 0.42rem;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.grid-half {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 600px) {
  .grid-half { grid-template-columns: 1fr; }
}

.list-plain { list-style: none; }
.list-plain li {
  padding: 6px 0;
  border-bottom: 1px dashed var(--border-light);
  font-size: 0.9rem;
}

.site-footer {
  text-align: center;
  margin-top: 30px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
  font-size: 0.8rem;
  color: var(--text-dim);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.gallery-item {
  border: 1px solid var(--border);
  background: var(--bg-header);
}

.gallery-item img { width: 100%; height: 160px; object-fit: cover; }
.gallery-cap { padding: 6px; font-size: 0.8rem; text-align: center; }

.link-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--border-light);
  margin-bottom: 8px;
  text-decoration: none;
  color: var(--text);
}

.link-row:hover { background: var(--bg-header); }
.link-row img { width: 40px; height: 40px; object-fit: contain; border: 1px solid var(--border); }
