:root {
  --background: 42 38% 97%;
  --foreground: 218 38% 12%;
  --primary: 174 76% 28%;
  --secondary: 219 18% 35%;
  --muted: 180 18% 90%;
  --destructive: 0 72% 48%;
  --border: 210 20% 84%;
  --card: 0 0% 100%;
  --shadow-sm: 0 1px 2px hsl(218 38% 12% / 0.06);
  --shadow-md: 0 12px 30px hsl(218 38% 12% / 0.10);
  --shadow-lg: 0 28px 70px hsl(218 38% 12% / 0.16);
  --transition-fast: 160ms ease;
  --transition-smooth: 260ms cubic-bezier(0.22, 1, 0.36, 1);
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 30px;
}

.dark {
  --background: 220 30% 8%;
  --foreground: 42 35% 94%;
  --primary: 172 70% 48%;
  --secondary: 214 16% 72%;
  --muted: 219 24% 16%;
  --destructive: 0 72% 58%;
  --border: 218 22% 24%;
  --card: 219 28% 12%;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  padding-bottom: calc(72px + env(safe-area-inset-bottom));
}
@media (min-width: 768px) { body { padding-bottom: 0; } }

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

.bg-1 { background: hsl(var(--background)); }
.bg-2 { background: hsl(var(--card)); }
.bg-3 { background: hsl(var(--muted) / 0.42); }
.bg-4 { background: hsl(var(--primary) / 0.08); }
.text-primary { color: hsl(var(--foreground)); }
.text-secondary { color: hsl(var(--secondary)); }
.text-tertiary { color: hsl(var(--secondary) / 0.72); }
.accent { color: hsl(var(--primary)); }

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: linear-gradient(135deg, hsl(var(--primary)), hsl(210 68% 34%));
  color: white;
  font-size: 12px;
  letter-spacing: -0.02em;
  box-shadow: var(--shadow-sm);
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: hsl(var(--primary));
  box-shadow: 0 0 0 5px hsl(var(--primary) / 0.12);
}

.eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.78rem;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: hsl(var(--primary));
}

.section-pad { padding: 3.75rem 0; }
@media (min-width: 768px) { .section-pad { padding: 5rem 0; } }

.section-heading {
  display: grid;
  gap: 1rem;
}
@media (min-width: 900px) {
  .section-heading {
    grid-template-columns: 1fr 0.72fr;
    align-items: end;
  }
}
.section-title {
  margin: 0;
  font-size: clamp(2rem, 6vw, 3.5rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
  font-weight: 700;
  color: hsl(var(--foreground));
}
.section-copy {
  margin: 0;
  color: hsl(var(--secondary));
  line-height: 1.75;
  font-size: 1.05rem;
}

.hero-panel {
  position: relative;
  border: 1px solid hsl(var(--border));
  background:
    radial-gradient(circle at 20% 10%, hsl(var(--primary) / 0.18), transparent 32%),
    linear-gradient(145deg, hsl(var(--card)), hsl(var(--muted) / 0.42));
  border-radius: var(--radius-lg);
  padding: 1rem;
  min-height: 420px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.hero-panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: hsl(var(--secondary));
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.5rem 0.5rem 1rem;
}
.hero-dashboard {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}
.signal-card {
  min-height: 135px;
  border: 1px solid hsl(var(--border));
  border-radius: 22px;
  background: hsl(var(--card) / 0.82);
  backdrop-filter: blur(18px);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
}
.signal-card.large { grid-column: span 2; min-height: 170px; }
.signal-card strong {
  font-size: clamp(2.5rem, 12vw, 5rem);
  line-height: 0.9;
  letter-spacing: -0.08em;
  color: hsl(var(--foreground));
}
.signal-label, .signal-note {
  color: hsl(var(--secondary));
  font-weight: 700;
  font-size: 0.88rem;
}
.map-grid {
  position: absolute;
  inset: auto -20% -18% -20%;
  height: 180px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  transform: rotate(-5deg);
  opacity: 0.55;
}
.map-grid span {
  border-radius: 18px;
  background: hsl(var(--primary) / 0.11);
  border: 1px solid hsl(var(--primary) / 0.14);
}

.project-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth), border-color var(--transition-smooth);
}
@media (hover: hover) {
  .project-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: hsl(var(--primary) / 0.35);
  }
}
.visual-card {
  position: relative;
  min-height: 240px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, hsl(var(--primary) / 0.12), hsl(var(--muted)));
}
.case-visual { min-height: 360px; border-radius: var(--radius-lg); border: 1px solid hsl(var(--border)); }
.visual-card::before {
  content: "";
  position: absolute;
  inset: 12%;
  border-radius: 42px;
  border: 1px solid hsl(0 0% 100% / 0.34);
  background: hsl(0 0% 100% / 0.14);
  backdrop-filter: blur(10px);
}
.visual-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(hsl(0 0% 100% / 0.18) 1px, transparent 1px),
    linear-gradient(90deg, hsl(0 0% 100% / 0.18) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(circle at center, black, transparent 72%);
}
.visual-label {
  position: relative;
  z-index: 2;
  width: 118px;
  height: 118px;
  border-radius: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: hsl(var(--card) / 0.78);
  border: 1px solid hsl(0 0% 100% / 0.48);
  box-shadow: var(--shadow-md);
  color: hsl(var(--foreground));
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -0.08em;
}
.variant-civic { background: linear-gradient(135deg, hsl(174 76% 28%), hsl(214 70% 30%)); }
.variant-welfare { background: linear-gradient(135deg, hsl(26 76% 49%), hsl(346 58% 42%)); }
.variant-brand { background: linear-gradient(135deg, hsl(259 46% 44%), hsl(178 55% 34%)); }
.variant-poster { background: linear-gradient(135deg, hsl(220 34% 18%), hsl(42 74% 54%)); }

.timeline { position: relative; display: grid; gap: 1rem; }
.timeline-item { display: grid; gap: 0.75rem; }
@media (min-width: 760px) {
  .timeline-item { grid-template-columns: 120px 1fr; align-items: stretch; }
}
.timeline-year {
  color: hsl(var(--primary));
  font-weight: 900;
  letter-spacing: -0.04em;
  font-size: 1.35rem;
}
.timeline-card {
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.profile-card {
  border-radius: var(--radius-lg);
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card));
  padding: 1rem;
  box-shadow: var(--shadow-md);
}
.profile-portrait {
  min-height: 380px;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 28% 20%, hsl(var(--primary) / 0.30), transparent 28%),
    linear-gradient(145deg, hsl(var(--muted)), hsl(var(--primary) / 0.16));
  overflow: hidden;
}
.profile-portrait span {
  width: 138px;
  height: 138px;
  border-radius: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: hsl(var(--card) / 0.76);
  border: 1px solid hsl(0 0% 100% / 0.46);
  color: hsl(var(--foreground));
  font-size: 2.5rem;
  font-weight: 900;
  letter-spacing: -0.08em;
  box-shadow: var(--shadow-md);
}
.profile-caption {
  display: grid;
  gap: 0.35rem;
  padding: 1rem 0.25rem 0.25rem;
}
.profile-caption strong { color: hsl(var(--foreground)); }
.profile-caption span { color: hsl(var(--secondary)); line-height: 1.6; }

.footer-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid hsl(var(--border));
  padding: 0 1rem;
  color: hsl(var(--foreground));
  font-weight: 700;
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}
.footer-link:hover { border-color: hsl(var(--primary) / 0.45); background: hsl(var(--primary) / 0.08); }
.footer-link.primary { background: hsl(var(--primary)); border-color: hsl(var(--primary)); color: white; }

.bottom-nav-safe { padding-bottom: env(safe-area-inset-bottom); }
.nav-icon-active { transform: translateY(-1px); }

.empty-state {
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card));
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.empty-state h3 { margin: 0; color: hsl(var(--foreground)); font-size: 1.35rem; }
.empty-state p { color: hsl(var(--secondary)); line-height: 1.7; }
.skeleton-card {
  min-height: 420px;
  border-radius: var(--radius-lg);
  background: linear-gradient(90deg, hsl(var(--muted) / 0.45), hsl(var(--card)), hsl(var(--muted) / 0.45));
  background-size: 220% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border: 1px solid hsl(var(--border));
}
@keyframes shimmer { 0% { background-position: 0% 50%; } 100% { background-position: 220% 50%; } }

.case-page { background: hsl(var(--background)); }
.case-block {
  border-radius: var(--radius-lg);
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card));
  padding: 1.35rem;
  box-shadow: var(--shadow-sm);
}
.case-block h2 {
  margin: 0 0 1rem;
  color: hsl(var(--foreground));
  font-size: 1.25rem;
  letter-spacing: -0.03em;
}
.case-block ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.75rem; }
.case-block li {
  padding: 0.9rem 1rem;
  border-radius: 16px;
  background: hsl(var(--muted) / 0.52);
  color: hsl(var(--secondary));
  font-weight: 650;
}
.process-row {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 1rem;
  align-items: start;
  padding: 1rem;
  border-radius: 18px;
  background: hsl(var(--muted) / 0.42);
}
.process-row span { color: hsl(var(--primary)); font-weight: 900; }
.process-row p { margin: 0; color: hsl(var(--secondary)); line-height: 1.7; }

input, textarea, select { font-size: max(16px, 1rem); }

@media (max-width: 420px) {
  .hero-panel { min-height: 360px; }
  .signal-card { min-height: 120px; }
  .profile-portrait { min-height: 300px; }
}
