:root {
  color-scheme: light;
  --bg: #faf8f4;
  --bg-soft: #f0ede6;
  --ink: #1a1614;
  --ink-soft: rgba(26, 22, 20, 0.68);
  --accent: #e63946;
  --accent-2: #457b9d;
  --accent-3: #f77f00;
  --stroke: rgba(26, 22, 20, 0.12);
  --glass: rgba(250, 248, 244, 0.85);
  --glow: radial-gradient(circle at 20% 20%, rgba(230, 57, 70, 0.15), transparent 55%);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
  --shadow-heavy: 0 30px 80px rgba(0, 0, 0, 0.15);
  --shadow-hover: 0 24px 56px rgba(0, 0, 0, 0.12);
  --max-width: 1400px;
}

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

body {
  min-height: 100vh;
  font-family: "IBM Plex Sans", sans-serif;
  background: linear-gradient(135deg, #fdfbf7 0%, #f5f1ea 50%, #ebe7dd 100%);
  color: var(--ink);
  overflow-x: hidden;
  position: relative;
}

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

.intro {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 34%, rgba(255, 255, 255, 0.18), transparent 34%),
    linear-gradient(135deg, rgba(253, 251, 247, 0.98) 0%, rgba(245, 241, 234, 0.96) 50%, rgba(235, 231, 221, 0.95) 100%);
  opacity: 1;
  visibility: visible;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  pointer-events: none;
}

.intro.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.intro-content {
  position: relative;
  z-index: 2;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.intro-kicker {
  font-size: 0.85rem;
  letter-spacing: 0.4em;
  color: var(--ink-soft);
  font-weight: 500;
}

.intro-logo {
  font-family: "Cinzel", serif;
  font-size: clamp(4rem, 8vw, 7rem);
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--ink);
  margin: 0;
}

.progress-ring {
  position: relative;
  width: 200px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.progress-ring svg {
  transform: scaleX(-1);
}

.progress-ring-circle {
  stroke-dasharray: 534.07;
  stroke-dashoffset: 534.07;
  transition: stroke-dashoffset 0.3s ease;
}

.progress-percent {
  position: absolute;
  font-size: 2rem;
  font-weight: 700;
  color: var(--ink);
  font-family: "Cinzel", serif;
}

.intro-sub {
  font-size: 0.9rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

body.is-booting {
  overflow: hidden;
}

body.is-routing {
  overflow: hidden;
  background: #fff;
}

.site {
  opacity: 1;
  visibility: visible;
  will-change: clip-path;
}

body.is-booting .site {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

body.is-routing .site {
  pointer-events: none;
}

body:not(.effects-ready) .noise,
body:not(.effects-ready) .glow-grid {
  display: none;
}

body:not(.effects-ready) .ring,
body:not(.effects-ready) .satellite,
body:not(.effects-ready) .glow {
  animation-play-state: paused;
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
  opacity: 0.24;
  z-index: 2;
}

.glow-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.glow {
  position: absolute;
  width: 320px;
  height: 320px;
  background: var(--glow);
  opacity: 0.24;
  filter: blur(36px);
  will-change: transform, opacity;
}

.g1 {
  top: -100px;
  right: 10%;
  background: radial-gradient(circle at 50% 50%, rgba(230, 57, 70, 0.25), transparent 70%);
  animation: glowDriftOne 24s ease-in-out infinite alternate;
}

.g2 {
  bottom: -80px;
  left: 5%;
  background: radial-gradient(circle at 50% 50%, rgba(69, 123, 157, 0.2), transparent 70%);
  animation: glowDriftTwo 28s ease-in-out infinite alternate;
}

.g3 {
  top: 40%;
  left: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(247, 127, 0, 0.18), transparent 70%);
  animation: glowDriftThree 26s ease-in-out infinite alternate;
}

@keyframes glowDriftOne {
  from {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 0.26;
  }

  to {
    transform: translate3d(24px, 16px, 0) scale(1.04);
    opacity: 0.38;
  }
}

@keyframes glowDriftTwo {
  from {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 0.24;
  }

  to {
    transform: translate3d(-20px, -14px, 0) scale(1.05);
    opacity: 0.34;
  }
}

@keyframes glowDriftThree {
  from {
    transform: translate3d(0, 0, 0) scale(0.98);
    opacity: 0.22;
  }

  to {
    transform: translate3d(10px, 18px, 0) scale(1.03);
    opacity: 0.32;
  }
}

.hero {
  position: relative;
  z-index: 3;
  max-width: 100%;
  margin: 0 auto;
  padding: 120px 24px 80px;
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 48px;
  align-items: start;
}

.hero-center {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 80px;
  align-items: start;
  max-width: var(--max-width);
  margin: 0 auto;
}

.sidebar {
  position: sticky;
  top: 120px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.sidebar-section {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(16px);
  border: 2px solid rgba(26, 22, 20, 0.08);
  border-radius: 20px;
  padding: 20px;
}

.sidebar-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--ink-soft);
  margin-bottom: 16px;
  font-weight: 600;
}

.sidebar-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-link {
  display: block;
  padding: 8px 12px;
  color: var(--ink);
  text-decoration: none;
  border-radius: 8px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.sidebar-link:hover {
  background: rgba(230, 57, 70, 0.1);
  color: var(--accent);
  transform: translateX(4px);
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.activity-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.activity-text {
  line-height: 1.4;
}

.status-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  font-size: 0.9rem;
}

.status-label {
  color: var(--ink);
  font-weight: 500;
}

.status-badge {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.status-online {
  background: rgba(34, 197, 94, 0.15);
  color: #16a34a;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 0;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  font-family: "Cinzel", serif;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.hero-title {
  font-family: "Cinzel", serif;
  font-size: clamp(3.5rem, 6vw, 6rem);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.1;
  font-weight: 700;
  background: linear-gradient(135deg, var(--ink) 0%, var(--ink-soft) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  margin-top: 20px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.hero-tag {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
}

.chip {
  padding: 8px 18px;
  border: 1.5px solid var(--stroke);
  border-radius: 999px;
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  font-weight: 500;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-top: 28px;
}

.primary-btn {
  padding: 16px 36px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  letter-spacing: 0.08em;
  box-shadow: var(--shadow-heavy);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 35px 90px rgba(0, 0, 0, 0.2);
}

.ghost-btn {
  padding: 16px 36px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  color: var(--ink);
  background: transparent;
  font-weight: 500;
  letter-spacing: 0.08em;
  transition: all 0.3s ease;
}

.ghost-btn:hover {
  background: var(--ink);
  color: var(--bg);
}

.hero-right {
  display: grid;
  gap: 32px;
  justify-items: start;
  position: relative;
}

.orbit {
  width: 320px;
  aspect-ratio: 1;
  position: relative;
  margin: 0;
}

.ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--stroke);
  transform: rotate(0deg) scale(var(--scale));
  transform-origin: center;
  animation: ringOrbit 22s linear infinite;
  will-change: transform;
}

.ring:nth-child(1) {
  --scale: 1;
  border-color: var(--accent);
  border-width: 3px;
  animation-duration: 18s;
}

.ring:nth-child(2) {
  --scale: 0.75;
  animation-duration: 24s;
  animation-direction: reverse;
}

.ring:nth-child(3) {
  --scale: 0.5;
  animation-duration: 30s;
}

.satellite {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 24px;
  height: 24px;
  margin: -12px 0 0 -12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 20px rgba(230, 57, 70, 0.6);
  animation: satelliteOrbit 8s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
  will-change: transform;
}

@keyframes ringOrbit {
  from {
    transform: rotate(0deg) scale(var(--scale));
  }

  to {
    transform: rotate(360deg) scale(var(--scale));
  }
}

@keyframes satelliteOrbit {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }

  25% {
    transform: translate3d(140px, -50px, 0) scale(1.08);
  }

  50% {
    transform: translate3d(50px, 140px, 0) scale(0.92);
  }

  75% {
    transform: translate3d(-100px, 50px, 0) scale(1.04);
  }

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

.hero-panel {
  width: 100%;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(16px);
  border: 2px solid rgba(26, 22, 20, 0.08);
  border-radius: 24px;
  padding: 24px 28px;
  display: grid;
  gap: 14px;
  box-shadow: var(--shadow-heavy);
}

.panel-row {
  display: flex;
  justify-content: space-between;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 500;
}

.panel-row span:last-child {
  color: var(--accent);
  font-weight: 600;
}

.stage {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 48px 100px;
  position: relative;
  z-index: 3;
}

.filters {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 32px;
  margin-bottom: 48px;
}

.label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.32em;
  color: var(--ink-soft);
}

.filter-tags {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.filter {
  padding: 10px 20px;
  border-radius: 999px;
  border: 2px solid var(--stroke);
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  font-size: 0.85rem;
  color: var(--ink);
  font-weight: 500;
  transition: all 0.3s ease;
}

.filter.active {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.filter:hover {
  transform: translateY(-2px);
  border-color: var(--ink);
}

.sort-pill {
  padding: 12px 20px;
  border-radius: 999px;
  border: 2px solid var(--stroke);
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  font-weight: 500;
}

.nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
}

.group-header {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0 16px;
  border-bottom: 2px solid var(--stroke);
  margin-top: 32px;
}

.group-header:first-child {
  margin-top: 0;
}

.group-header h2 {
  font-family: "Cinzel", serif;
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.05em;
  margin: 0;
}

.group-count {
  font-size: 0.9rem;
  color: var(--ink-soft);
  font-weight: 500;
  padding: 6px 16px;
  background: rgba(230, 57, 70, 0.1);
  border-radius: 999px;
}

.nav-card {
  position: relative;
  padding: 32px 28px 36px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  border: 2px solid rgba(26, 22, 20, 0.08);
  min-height: 260px;
  overflow: visible;
  transition:
    transform 0.28s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.28s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.2s ease,
    border-radius 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow);
  text-decoration: none;
  display: block;
  opacity: 1;
}

.nav-card:hover {
  transform: translate3d(0, -6px, 0);
  border-color: var(--accent);
  box-shadow: var(--shadow-hover);
  opacity: 1;
  z-index: 10;
  border-radius: 24px 24px 0 0;
}

.nav-card.expand-up:hover {
  border-radius: 0 0 24px 24px;
}

.nav-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(230, 57, 70, 0.08), rgba(69, 123, 157, 0.08));
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: inherit;
  z-index: 0;
}

.nav-card:hover::before {
  opacity: 0.68;
}

@media (hover: hover) and (pointer: fine) {
  .nav-grid:hover .nav-card {
    opacity: 0.84;
  }

  .nav-grid:hover .nav-card:hover {
    opacity: 1;
  }
}

.nav-card-expanded {
  position: absolute;
  top: 100%;
  left: -2px;
  right: -2px;
  background: rgba(255, 255, 255, 0.93);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(26, 22, 20, 0.08);
  border-top: none;
  border-radius: 0 0 24px 24px;
  padding: 22px 28px;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate3d(0, -10px, 0);
  transition:
    opacity 0.22s ease,
    transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1),
    border-color 0.28s cubic-bezier(0.34, 1.56, 0.64, 1),
    visibility 0s linear 0.28s;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.1);
  z-index: 5;
}

.nav-card.expand-up .nav-card-expanded {
  top: auto;
  bottom: 100%;
  border-top: 2px solid rgba(26, 22, 20, 0.08);
  border-bottom: none;
  border-radius: 24px 24px 0 0;
  transform: translate3d(0, 10px, 0);
  box-shadow: 0 -10px 26px rgba(0, 0, 0, 0.1);
}

.nav-card:hover .nav-card-expanded {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate3d(0, 0, 0);
  border-color: var(--accent);
  transition-delay: 0s;
}

.expanded-content h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--ink-soft);
  margin-bottom: 12px;
  font-weight: 600;
}

.project-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 96px;
  margin-bottom: 20px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 16px;
  border: 2px solid rgba(26, 22, 20, 0.08);
}

.project-icon img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 12px;
  transition: transform 0.22s ease;
}

.nav-card:hover .project-icon img {
  transform: scale(1.04);
}

.expanded-content ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.expanded-content li {
  font-size: 0.9rem;
  color: var(--ink);
  padding-left: 16px;
  position: relative;
}

.expanded-content li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.expanded-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.expanded-tag {
  padding: 6px 12px;
  background: rgba(230, 57, 70, 0.1);
  border-radius: 999px;
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 500;
}

.nav-card .meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--ink-soft);
  font-weight: 600;
  position: relative;
  z-index: 1;
}

.nav-card h3 {
  margin-top: 24px;
  font-family: "Cinzel", serif;
  font-size: 1.6rem;
  letter-spacing: 0.05em;
  font-weight: 600;
  color: var(--ink);
  position: relative;
  z-index: 1;
}

.nav-card p {
  margin-top: 16px;
  color: var(--ink-soft);
  line-height: 1.7;
  font-size: 0.95rem;
  position: relative;
  z-index: 1;
}

.nav-card .cta {
  margin-top: 28px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.05em;
  position: relative;
  z-index: 1;
}

.nav-card .cta span {
  display: inline-block;
  width: 48px;
  height: 2px;
  background: currentColor;
  transition: width 0.4s ease;
}

.nav-card:hover .cta span {
  width: 72px;
}

.nav-card .hover-line {
  position: absolute;
  inset: auto auto 28px 28px;
  width: 0;
  height: 3px;
  background: var(--accent);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-card:hover .hover-line {
  width: 100px;
}

.footer {
  border-top: 2px solid rgba(26, 22, 20, 0.08);
  padding: 32px 48px;
  display: flex;
  justify-content: space-between;
  color: var(--ink-soft);
  font-size: 0.85rem;
  z-index: 3;
  position: relative;
  font-weight: 500;
}

@media (prefers-reduced-motion: reduce) {
  .intro,
  .site,
  .progress-ring-circle,
  .filter,
  .nav-card,
  .nav-card::before,
  .nav-card-expanded,
  .project-icon img,
  .nav-card .cta span,
  .nav-card .hover-line,
  .ring,
  .satellite,
  .glow {
    animation: none !important;
    transition: none !important;
  }

  .ring {
    transform: rotate(0deg) scale(var(--scale));
  }

  .satellite {
    transform: translate3d(0, 0, 0);
  }
}

@media (max-width: 1200px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 80px 24px 48px;
  }

  .hero-center {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .sidebar {
    position: relative;
    top: 0;
  }

  .sidebar-left,
  .sidebar-right {
    display: none;
  }
}

@media (max-width: 720px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 80px 24px 48px;
    gap: 48px;
  }

  .hero-center {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-right {
    justify-items: center;
  }

  .filters {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer {
    flex-direction: column;
    gap: 10px;
    padding: 24px;
  }

  .stage {
    padding: 0 24px 72px;
  }

  .nav-grid {
    grid-template-columns: 1fr;
  }
}
