:root {
  --bg: #12091d;
  --text: #f8f1ff;
  --muted: rgba(248, 241, 255, 0.72);
  --line: rgba(255, 255, 255, 0.14);
  --pink: #ff8ec8;
  --pink-deep: #ff5aa8;
  --blue: #7aa2ff;
  --violet: #b48cff;
  --glass: rgba(18, 10, 32, 0.48);
  --glass-2: rgba(28, 16, 48, 0.66);
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  --radius: 26px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  color: var(--text);
  font-family: "Outfit", "Noto Sans SC", sans-serif;
  background: #0c0614;
  overflow: hidden;
  user-select: none;
}

button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
a { color: inherit; }

.scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #12091d;
}

.gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1000px 520px at 18% 10%, rgba(255, 120, 190, 0.22), transparent 55%),
    radial-gradient(900px 480px at 85% 18%, rgba(122, 162, 255, 0.2), transparent 50%),
    linear-gradient(180deg, #150a24 0%, #1d0f33 36%, #3a1850 68%, #6d3568 100%);
}

.aurora {
  position: absolute;
  inset: -10% -10% auto -10%;
  height: 55%;
  background:
    conic-gradient(from 210deg at 50% 50%, rgba(255,142,200,0.12), rgba(122,162,255,0.08), rgba(180,140,255,0.14), rgba(255,142,200,0.1));
  filter: blur(30px);
  opacity: 0.8;
  animation: drift 16s ease-in-out infinite alternate;
}

@keyframes drift {
  from { transform: translate3d(-2%, -1%, 0) scale(1); }
  to { transform: translate3d(3%, 2%, 0) scale(1.05); }
}

.vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent 40%, rgba(8, 3, 16, 0.55) 100%);
  pointer-events: none;
}

.moon {
  position: absolute;
  top: 9%;
  right: 13%;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 32%, #fff8fd 0%, #ffe1f2 36%, #f0b7ff 70%, #c9a0ff 100%);
  box-shadow:
    0 0 40px rgba(255, 190, 230, 0.55),
    0 0 120px rgba(180, 130, 255, 0.28),
    0 0 220px rgba(255, 120, 190, 0.12);
}

.moon::after {
  content: "";
  position: absolute;
  inset: 18% 22% auto auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(214, 170, 220, 0.28);
  filter: blur(0.2px);
}

.stars span {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: #fff;
  opacity: 0.7;
  animation: twinkle var(--d, 3s) ease-in-out infinite;
}
@keyframes twinkle {
  0%, 100% { opacity: 0.2; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.35); }
}

.haze {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 45%;
  background: linear-gradient(180deg, transparent, rgba(90, 40, 90, 0.18) 40%, rgba(20, 8, 30, 0.35));
}

.ridge {
  position: absolute;
  left: -5%;
  right: -5%;
  bottom: 0;
  height: 38%;
  pointer-events: none;
}
.ridge-back {
  height: 42%;
  background: linear-gradient(110deg, transparent 30%, rgba(48, 24, 78, 0.9) 30.2% 55%, transparent 55.2%),
              linear-gradient(-120deg, transparent 42%, rgba(36, 18, 62, 0.92) 42.2% 70%, transparent 70.2%);
  filter: blur(0.4px);
  opacity: 0.9;
}
.ridge-mid {
  height: 34%;
  background: linear-gradient(150deg, transparent 28%, rgba(28, 14, 48, 0.96) 28.2%),
              linear-gradient(-145deg, transparent 48%, rgba(24, 12, 42, 0.96) 48.2%);
}
.ridge-front {
  height: 24%;
  background: linear-gradient(180deg, transparent, rgba(10, 4, 18, 0.55)),
              linear-gradient(160deg, transparent 20%, rgba(16, 8, 28, 0.98) 20.2%);
}

.cityline {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 22%;
  opacity: 0.85;
  background:
    linear-gradient(90deg,
      transparent 0 6%,
      rgba(12,6,22,0.95) 6% 9%,
      transparent 9% 14%,
      rgba(12,6,22,0.95) 14% 17%,
      transparent 17% 24%,
      rgba(12,6,22,0.95) 24% 31%,
      transparent 31% 40%,
      rgba(12,6,22,0.95) 40% 44%,
      transparent 44% 52%,
      rgba(12,6,22,0.95) 52% 58%,
      transparent 58% 67%,
      rgba(12,6,22,0.95) 67% 72%,
      transparent 72% 80%,
      rgba(12,6,22,0.95) 80% 86%,
      transparent 86% 100%);
}

.ground-glow {
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: -40px;
  height: 120px;
  background: radial-gradient(ellipse at center, rgba(255, 120, 190, 0.18), transparent 70%);
  filter: blur(10px);
}

#sakura {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.topbar, .stage, .layer-windows, .dock-layer { position: relative; z-index: 2; }

.topbar {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-orb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pink), var(--blue));
  box-shadow: 0 0 0 5px rgba(255, 142, 200, 0.12), 0 0 24px rgba(255, 142, 200, 0.45);
}
.brand-name {
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.1;
}
.brand-sub {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.pill {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.05);
  color: var(--muted);
  backdrop-filter: blur(10px);
  transition: 0.18s ease;
}
.pill:hover {
  color: white;
  border-color: rgba(255,255,255,0.28);
  background: rgba(255,255,255,0.08);
}
.timebox { text-align: right; }
.time {
  font-size: 18px;
  font-weight: 650;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}
.date {
  font-size: 12px;
  color: var(--muted);
}

.stage {
  height: calc(100vh - 64px - 118px);
  padding: 8px 22px 0;
  display: grid;
  grid-template-columns: minmax(280px, 460px) 1fr;
  gap: 28px;
  align-items: start;
}

.hero-card {
  padding: 28px 26px 24px;
  border-radius: 30px;
  background: linear-gradient(160deg, rgba(255,255,255,0.10), rgba(255,255,255,0.03));
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px) saturate(150%);
  animation: rise 0.55s ease both;
}
.hero-card.hidden { display: none; }

.hero-kicker {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: #ffd4ec;
  background: rgba(255, 100, 170, 0.14);
  border: 1px solid rgba(255, 150, 200, 0.18);
}
.hero-card h1 {
  margin: 14px 0 10px;
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  line-height: 1.18;
  letter-spacing: -0.02em;
}
.hero-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
  font-size: 0.98rem;
}
.hero-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.btn {
  border-radius: 999px;
  padding: 11px 16px;
  transition: 0.18s ease;
}
.btn-main {
  background: linear-gradient(135deg, #ff8ec8, #b48cff 55%, #7aa2ff);
  box-shadow: 0 12px 30px rgba(255, 100, 180, 0.28);
  font-weight: 650;
}
.btn-ghost {
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.05);
  color: var(--muted);
}
.btn:hover { transform: translateY(-1px); }
.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.hero-tags span {
  font-size: 12px;
  color: var(--muted);
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.12);
}

.icons {
  display: grid;
  grid-template-columns: repeat(3, minmax(96px, 120px));
  gap: 16px 14px;
  justify-content: end;
  padding-top: 8px;
  animation: rise 0.65s ease both;
}

.app {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 10px 8px;
  border-radius: 22px;
  transition: 0.18s ease;
}
.app:hover {
  background: rgba(255,255,255,0.06);
  transform: translateY(-3px);
}
.app-icon {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  color: white;
  box-shadow:
    0 16px 30px rgba(0,0,0,0.28),
    inset 0 1px 0 rgba(255,255,255,0.35);
}
.app-icon svg { width: 30px; height: 30px; }
.app-name {
  font-size: 13px;
  color: rgba(255,255,255,0.92);
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
}

.i-about { background: linear-gradient(145deg, #ff9ad5, #ff5ea8 60%, #c86bff); }
.i-projects { background: linear-gradient(145deg, #8eb6ff, #6f7dff 60%, #5b57ff); }
.i-gallery { background: linear-gradient(145deg, #ffd0a8, #ff8f8a 60%, #ff6f9f); }
.i-links { background: linear-gradient(145deg, #9dffe7, #63d4ff 60%, #7090ff); }
.i-contact { background: linear-gradient(145deg, #ffd98a, #ff9d72 60%, #ff6f9d); }
.i-settings { background: linear-gradient(145deg, #d5dcff, #9aa7d8 60%, #7d89b8); color: #1b1630; }

.layer-windows {
  position: fixed;
  inset: 64px 0 110px;
  pointer-events: none;
  z-index: 8;
}

.window {
  position: absolute;
  width: min(540px, calc(100vw - 24px));
  min-height: 300px;
  max-height: calc(100vh - 190px);
  border-radius: var(--radius);
  overflow: hidden;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  background: var(--glass-2);
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(160%);
  animation: pop 0.22s ease;
}
.window.active {
  box-shadow:
    0 30px 90px rgba(0,0,0,0.5),
    0 0 0 1px rgba(255, 142, 200, 0.2);
}
.window.maximized {
  left: 12px !important;
  top: 12px !important;
  width: calc(100% - 24px) !important;
  height: calc(100% - 24px) !important;
  max-height: none;
}
.window.minimized { display: none; }

.win-bar {
  height: 46px;
  display: grid;
  grid-template-columns: 78px 1fr 78px;
  align-items: center;
  padding: 0 14px;
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  cursor: grab;
}
.win-bar:active { cursor: grabbing; }
.dots { display: flex; gap: 8px; }
.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.12);
}
.dot.close { background: #ff6b7a; }
.dot.min { background: #ffd166; }
.dot.max { background: #6dde9d; }
.win-title {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}
.win-body {
  padding: 18px 20px 20px;
  overflow: auto;
  color: var(--muted);
  line-height: 1.75;
}
.win-body h2 {
  margin: 0 0 8px;
  color: white;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}
.win-body h3 {
  margin: 16px 0 8px;
  color: #ffe0f2;
  font-size: 0.98rem;
}
.win-body p { margin: 0 0 10px; }

.cards { display: grid; gap: 10px; }
.card {
  padding: 14px 14px;
  border-radius: 18px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
}
.card strong {
  display: block;
  color: white;
  margin-bottom: 4px;
}

.chips, .links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip, .link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  text-decoration: none;
  transition: 0.18s ease;
}
.chip:hover, .link:hover {
  background: rgba(255,142,200,0.12);
  border-color: rgba(255,142,200,0.28);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.shot {
  aspect-ratio: 1.3;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.1);
  position: relative;
  overflow: hidden;
}
.shot span {
  position: absolute;
  left: 12px;
  bottom: 10px;
  font-size: 12px;
  color: white;
  text-shadow: 0 2px 10px rgba(0,0,0,0.4);
}
.shot-a { background: linear-gradient(145deg, #5b2d6d, #ff8ec8 80%); }
.shot-b { background: linear-gradient(145deg, #243b78, #7aa2ff 80%); }
.shot-c { background: linear-gradient(145deg, #4a2460, #b48cff 80%); }
.shot-d { background: linear-gradient(145deg, #2a1848, #ffb4d8 80%); }

.dock-layer {
  position: fixed;
  left: 0; right: 0; bottom: 18px;
  display: flex;
  justify-content: center;
  z-index: 12;
  pointer-events: none;
}
.dock {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 28px;
  background: rgba(14, 8, 28, 0.55);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 18px 50px rgba(0,0,0,0.35);
  backdrop-filter: blur(18px) saturate(150%);
}
.dock-btn {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  transition: 0.16s ease;
}
.dock-btn:hover { transform: translateY(-10px) scale(1.08); }
.mini {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 15px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.28);
}
.dock-divider {
  width: 1px;
  height: 34px;
  margin: 0 4px;
  background: rgba(255,255,255,0.14);
}

body.theme-sakura .gradient {
  background:
    radial-gradient(1000px 520px at 18% 10%, rgba(255, 150, 190, 0.28), transparent 55%),
    radial-gradient(900px 480px at 85% 18%, rgba(255, 190, 220, 0.16), transparent 50%),
    linear-gradient(180deg, #2a1230 0%, #5a2a4a 42%, #c46b8a 78%, #ffb6c8 100%);
}
body.theme-night .gradient {
  background:
    radial-gradient(1000px 520px at 18% 10%, rgba(100, 140, 255, 0.18), transparent 55%),
    radial-gradient(900px 480px at 85% 18%, rgba(160, 120, 255, 0.16), transparent 50%),
    linear-gradient(180deg, #070b18 0%, #141b3a 45%, #2a1f55 78%, #4d2f78 100%);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pop {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 900px) {
  .stage {
    grid-template-columns: 1fr;
    height: calc(100vh - 64px - 110px);
    overflow: auto;
    padding-bottom: 12px;
  }
  .icons {
    justify-content: start;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .topbar { padding: 0 14px; }
  .brand-sub { display: none; }
}

@media (max-width: 560px) {
  .icons { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .app-icon { width: 64px; height: 64px; border-radius: 18px; }
  .hero-card { padding: 22px 18px 18px; border-radius: 24px; }
  .dock-btn, .mini { width: 46px; height: 46px; }
  .dock-btn { border-radius: 16px; }
  .mini { border-radius: 14px; font-size: 13px; }
}